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:
parent
d7673d398b
commit
27483fd0f5
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user