diff --git a/src/ChangeLog b/src/ChangeLog index 03b6ecdf..07411a2a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-05-23 Giuseppe Scrivano + + * http.c (http_atotm): Count the NUL character when copying the locale + string. + Reported by: Florian Weimer + 2010-05-16 Giuseppe Scrivano * Makefile.am (LDADD): Remove MD5_LDADD. diff --git a/src/http.c b/src/http.c index 1109e994..c5aa8ea0 100644 --- a/src/http.c +++ b/src/http.c @@ -3203,7 +3203,7 @@ http_atotm (const char *time_string) oldlocale = setlocale (LC_TIME, NULL); if (oldlocale) { - size_t l = strlen (oldlocale); + size_t l = strlen (oldlocale) + 1; if (l >= sizeof savedlocale) savedlocale[0] = '\0'; else