X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhttp.c;h=b779e36ee6f71d82318c8e5ba7e9780bcbbbf5c5;hp=5159d90260c2e4ec2db583eb7cf483d14ea7e750;hb=2c0e2b0afa06c675a79239b49b92085daff4c7af;hpb=dc99d9a487fb8b99dcd70ac770ce0dd68cddaa07 diff --git a/src/http.c b/src/http.c index 5159d902..b779e36e 100644 --- a/src/http.c +++ b/src/http.c @@ -581,8 +581,8 @@ response_header_copy (const struct response *resp, const char *name, return 0; if (bufsize) { - int len = MIN (e - b, bufsize); - strncpy (buf, b, len); + int len = MIN (e - b, bufsize - 1); + memcpy (buf, b, len); buf[len] = '\0'; } return 1; @@ -1904,7 +1904,7 @@ File `%s' already there, will not retrieve.\n"), *hstat.local_file); if (opt.verbose) { char *hurl = url_string (u, 1); - char tmp[15]; + char tmp[256]; strcpy (tmp, " "); if (count > 1) sprintf (tmp, _("(try:%2d)"), count);