1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Fix off-by-one error in cmd_file.

Published in <sxsit2rfzqo.fsf@florida.munich.redhat.com>.
This commit is contained in:
hniksic 2002-08-03 13:34:58 -07:00
parent d7673d398b
commit 27483fd0f5
2 changed files with 5 additions and 1 deletions

View 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

View 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);