Fix a bug : Bad memcpy length in localtime_r() and gmtime_r()
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
v0.5 (11/11/2014)
|
||||
v0.5 (19/06/2015)
|
||||
** User **
|
||||
Add tag management
|
||||
|
||||
@@ -7,6 +7,7 @@ v0.5 (11/11/2014)
|
||||
|
||||
** Bugs **
|
||||
Bug in generate month : if the next month has less days than the first, but there are operations on non existings days, use last day of new month.
|
||||
Bad memcpy length in localtime_r() and gmtime_r()
|
||||
|
||||
v0.4 (26/02/2013)
|
||||
** User **
|
||||
|
@@ -32,7 +32,7 @@ localtime_r (const time_t *timer, struct tm *result)
|
||||
if (local_result == NULL || result == NULL)
|
||||
return NULL;
|
||||
|
||||
memcpy (result, local_result, sizeof (result));
|
||||
memcpy (result, local_result, sizeof (*result));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ gmtime_r (const time_t *timer, struct tm *result)
|
||||
if (local_result == NULL || result == NULL)
|
||||
return NULL;
|
||||
|
||||
memcpy (result, local_result, sizeof (result));
|
||||
memcpy (result, local_result, sizeof (*result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user