Fix a bug : Bad memcpy length in localtime_r() and gmtime_r()
This commit is contained in:
parent
d310be1b6d
commit
7e5f13c445
|
@ -1,4 +1,4 @@
|
||||||
v0.5 (11/11/2014)
|
v0.5 (19/06/2015)
|
||||||
** User **
|
** User **
|
||||||
Add tag management
|
Add tag management
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ v0.5 (11/11/2014)
|
||||||
|
|
||||||
** Bugs **
|
** 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.
|
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)
|
v0.4 (26/02/2013)
|
||||||
** User **
|
** User **
|
||||||
|
|
|
@ -32,7 +32,7 @@ localtime_r (const time_t *timer, struct tm *result)
|
||||||
if (local_result == NULL || result == NULL)
|
if (local_result == NULL || result == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
memcpy (result, local_result, sizeof (result));
|
memcpy (result, local_result, sizeof (*result));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ gmtime_r (const time_t *timer, struct tm *result)
|
||||||
if (local_result == NULL || result == NULL)
|
if (local_result == NULL || result == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
memcpy (result, local_result, sizeof (result));
|
memcpy (result, local_result, sizeof (*result));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user