aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-05-16 22:59:24 -0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-05-17 19:23:10 +0200
commit3f7b800d54eb67d9b97f6e0933275155fdf13c70 (patch)
tree3901878a71705bd866032385915797dbe88e992c
parent45af5422c1c0c6ed50388a0d0d034010154be438 (diff)
downloadglibc-3f7b800d54eb67d9b97f6e0933275155fdf13c70.tar
glibc-3f7b800d54eb67d9b97f6e0933275155fdf13c70.tar.gz
glibc-3f7b800d54eb67d9b97f6e0933275155fdf13c70.tar.bz2
glibc-3f7b800d54eb67d9b97f6e0933275155fdf13c70.zip
Use TASK_THREAD_TIMES_INFO_COUNT when calling task_info with TASK_THREAD_TIMES_INFO
This hasn't caused any problems yet but we are passing a pointer to struct task_thread_times_info which can cause problems if we populate over the existing size of the struct. Message-Id: <ZGRDDNcOM2hA3CuT@jupiter.tail36e24.ts.net>
-rw-r--r--sysdeps/mach/clock_gettime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c
index cc8c821a7f..be775ed2bb 100644
--- a/sysdeps/mach/clock_gettime.c
+++ b/sysdeps/mach/clock_gettime.c
@@ -62,7 +62,7 @@ __clock_gettime (clockid_t clock_id, struct timespec *ts)
time_value_add (&t, &bi.system_time);
/* Live threads CPU time. */
- count = TASK_EVENTS_INFO_COUNT;
+ count = TASK_THREAD_TIMES_INFO_COUNT;
err = __task_info (__mach_task_self (), TASK_THREAD_TIMES_INFO,
(task_info_t) &tti, &count);
if (err)