]> sjero.net Git - wget/blobdiff - src/http.c
http_atotm copies the NUL character of the locale string.
[wget] / src / http.c
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