From: Cristy Date: Tue, 16 Apr 2019 20:51:18 +0000 (-0400) Subject: Wrong sizeof() parameter X-Git-Tag: 7.0.8-41~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03c8ec108059a1573d64178e93c354d3d3a5d882;p=imagemagick Wrong sizeof() parameter --- diff --git a/MagickCore/timer-private.h b/MagickCore/timer-private.h index b823cfeff..a58d3cf43 100644 --- a/MagickCore/timer-private.h +++ b/MagickCore/timer-private.h @@ -33,7 +33,7 @@ static inline void GetUTCTime(const time_t *timep,struct tm *result) my_time=gmtime(timep); if (my_time != (struct tm *) NULL) - (void) memcpy(result,my_time,sizeof(gm_time)); + (void) memcpy(result,my_time,sizeof(*my_time)); } #endif } @@ -49,7 +49,7 @@ static inline void GetLocalTime(const time_t *timep,struct tm *result) my_time=localtime(timep); if (my_time != (struct tm *) NULL) - (void) memcpy(result,my_time,sizeof(gm_time)); + (void) memcpy(result,my_time,sizeof(*my_time)); } #endif }