summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorEric Andersen2004-01-26 07:17:30 +0000
committerEric Andersen2004-01-26 07:17:30 +0000
commitf2ec37902a2a6aa54ab616bfa7f6d296bddc9b68 (patch)
tree09653594812d633d592f9f28df041e99139ae3d1 /networking
parent7018385fe71329af2f685b7859fbf8f6cedc8325 (diff)
downloadbusybox-f2ec37902a2a6aa54ab616bfa7f6d296bddc9b68.zip
busybox-f2ec37902a2a6aa54ab616bfa7f6d296bddc9b68.tar.gz
Pascal Brisset writes:
uuencode fails to encode binary data because it right-shifts bytes as signed chars and keeps the duplicated sign bits. The original base64_encode() from wget/http.c is broken as well, but it is only used to encode ascii data. -- Pascal
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 3fd1df1..59f78ac 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -119,7 +119,7 @@ static char *safe_fgets(char *s, int size, FILE *stream)
* oops... isn't something similar in uuencode.c?
* It would be better to use already existing code
*/
-char *base64enc(char *p, char *buf, int len) {
+char *base64enc(unsigned char *p, char *buf, int len) {
char al[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
"0123456789+/";
@@ -837,7 +837,7 @@ progressmeter(int flag)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: wget.c,v 1.66 2004/01/17 23:07:14 bug1 Exp $
+ * $Id: wget.c,v 1.67 2004/01/26 07:17:30 andersen Exp $
*/