[BusyBox-cvs] busybox/networking wget.c,1.66,1.67

Erik Andersen andersen at busybox.net
Mon Jan 26 07:17:32 UTC 2004


Update of /var/cvs/busybox/networking
In directory nail:/tmp/cvs-serv23012/networking

Modified Files:
	wget.c 
Log Message:
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



Index: wget.c
===================================================================
RCS file: /var/cvs/busybox/networking/wget.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- wget.c	17 Jan 2004 23:07:14 -0000	1.66
+++ wget.c	26 Jan 2004 07:17:30 -0000	1.67
@@ -119,7 +119,7 @@
  *  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+/";




More information about the busybox-cvs mailing list