From: Flavio Cruz Date: Wed, 17 May 2023 02:59:24 +0000 (-0400) Subject: Use TASK_THREAD_TIMES_INFO_COUNT when calling task_info with TASK_THREAD_TIMES_INFO X-Git-Tag: upstream/2.39~790 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f7b800d54eb67d9b97f6e0933275155fdf13c70;p=platform%2Fupstream%2Fglibc.git 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: --- diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c index cc8c821..be775ed 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)