summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-06-30 15:06:45 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-06-30 15:06:45 +0000
commit32a66a8e93626df3e1fa9dcee0a6046033c4c692 (patch)
tree1fffc5013ec5bd9a69c45640c7cdba6c9459d705 /networking
parent4bbeebd6668338ddf821e48010e79e3bd2eed4a7 (diff)
downloadbusybox-w32-32a66a8e93626df3e1fa9dcee0a6046033c4c692.tar.gz
busybox-w32-32a66a8e93626df3e1fa9dcee0a6046033c4c692.tar.bz2
busybox-w32-32a66a8e93626df3e1fa9dcee0a6046033c4c692.zip
wget: fix buffer overflow in HTTP auth
Diffstat (limited to 'networking')
-rw-r--r--networking/wget.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 2c060d77d..c06a09d72 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -267,11 +267,11 @@ int wget_main(int argc, char **argv)
267#if ENABLE_FEATURE_WGET_AUTHENTICATION 267#if ENABLE_FEATURE_WGET_AUTHENTICATION
268 if (target.user) { 268 if (target.user) {
269 fprintf(sfp, "Authorization: Basic %s\r\n", 269 fprintf(sfp, "Authorization: Basic %s\r\n",
270 base64enc((unsigned char*)target.user, buf, sizeof(buf))); 270 base64enc((unsigned char*)target.user, buf, strlen(target.user)));
271 } 271 }
272 if (use_proxy && server.user) { 272 if (use_proxy && server.user) {
273 fprintf(sfp, "Proxy-Authorization: Basic %s\r\n", 273 fprintf(sfp, "Proxy-Authorization: Basic %s\r\n",
274 base64enc((unsigned char*)server.user, buf, sizeof(buf))); 274 base64enc((unsigned char*)server.user, buf, strlen(server.user)));
275 } 275 }
276#endif 276#endif
277 277