]> sjero.net Git - wget/commitdiff
[svn] Fix off-by-one error in cmd_file.
authorhniksic <devnull@localhost>
Sat, 3 Aug 2002 20:34:58 +0000 (13:34 -0700)
committerhniksic <devnull@localhost>
Sat, 3 Aug 2002 20:34:58 +0000 (13:34 -0700)
Published in <sxsit2rfzqo.fsf@florida.munich.redhat.com>.

src/ChangeLog
src/init.c

index ae874689ea7a894356cb541c639df482f6f552d9..13436c668daebecad796802d4c64709cad309be3 100644 (file)
@@ -1,3 +1,7 @@
+2002-08-03  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * init.c (cmd_file): Allocate RESULT correctly.
+
 2002-07-24  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * recur.c (retrieve_tree): Check whether downloaded_html_set is
index 2afa3007f6742b9e2fa2731cbea9a91e0716975f..dec3744168f973e04e928b9df940d77ddbe5b72b 100644 (file)
@@ -689,7 +689,7 @@ cmd_file (const char *com, const char *val, void *closure)
        ;
 #endif
 
-      result = xmalloc (homelen + 1 + strlen (val));
+      result = xmalloc (homelen + 1 + strlen (val) + 1);
       memcpy (result, home, homelen);
       result[homelen] = '/';
       strcpy (result + homelen + 1, val);