]> sjero.net Git - wget/commitdiff
http_atotm copies the NUL character of the locale string.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 23 May 2010 08:58:05 +0000 (10:58 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 23 May 2010 08:58:05 +0000 (10:58 +0200)
src/ChangeLog
src/http.c

index 03b6ecdf45dd263ce3c9a156dcbd05454c7ffd96..07411a2ad6dcd148a65a18e4bafa29e07042ceec 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-23  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * http.c (http_atotm): Count the NUL character when copying the locale
+       string.
+       Reported by: Florian Weimer <fw@deneb.enyo.de>
+
 2010-05-16  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        * Makefile.am (LDADD): Remove MD5_LDADD.
index 1109e994e0b56f44c2ab50321a120ad541c7f206..c5aa8ea025ad18a7b16aa746da0bafdda1fc5fd5 100644 (file)
@@ -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