X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=networking%2Fwget.c;h=fdcc68df31ffcb5459e03af70e4445861c4770b8;hb=c44bc986b738977c5cd9741d9752a41ac022602f;hp=9c7ed9f1de299aa265c9bf350a13e031cc224caa;hpb=c1ef7bdd8d002ae0889efcf883d0e1b7faa938d4;p=oweals%2Fbusybox.git diff --git a/networking/wget.c b/networking/wget.c index 9c7ed9f1d..fdcc68df3 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -12,11 +12,11 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -238,7 +238,7 @@ int wget_main(int argc, char **argv) if (!fname_out) { // Dirty hack. Needed because bb_get_last_path_component // will destroy trailing / by storing '\0' in last byte! - if(target.path[strlen(target.path)-1]!='/') { + if(*target.path && target.path[strlen(target.path)-1]!='/') { fname_out = #ifdef CONFIG_FEATURE_WGET_STATUSBAR curfile = @@ -332,11 +332,11 @@ int wget_main(int argc, char **argv) #ifdef CONFIG_FEATURE_WGET_AUTHENTICATION if (target.user) { fprintf(sfp, "Authorization: Basic %s\r\n", - base64enc(target.user, buf, sizeof(buf))); + base64enc((unsigned char*)target.user, buf, sizeof(buf))); } if (use_proxy && server.user) { fprintf(sfp, "Proxy-Authorization: Basic %s\r\n", - base64enc(server.user, buf, sizeof(buf))); + base64enc((unsigned char*)server.user, buf, sizeof(buf))); } #endif @@ -853,13 +853,3 @@ progressmeter(int flag) * * $Id: wget.c,v 1.75 2004/10/08 08:27:40 andersen Exp $ */ - - - -/* -Local Variables: -c-file-style: "linux" -c-basic-offset: 4 -tab-width: 4 -End: -*/