diff --git a/ChangeLog b/ChangeLog index 00840b6..acde2ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 ** diff --git a/src/win32/gmtime_r.cpp b/src/win32/gmtime_r.cpp index 15f3395..430f339 100644 --- a/src/win32/gmtime_r.cpp +++ b/src/win32/gmtime_r.cpp @@ -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; }