[BusyBox-cvs] busybox/coreutils uuencode.c,1.25,1.26

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


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

Modified Files:
	uuencode.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: uuencode.c
===================================================================
RCS file: /var/cvs/busybox/coreutils/uuencode.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- uuencode.c	19 Mar 2003 09:11:34 -0000	1.25
+++ uuencode.c	26 Jan 2004 07:17:30 -0000	1.26
@@ -59,7 +59,7 @@
  * buffer of at least 1+BASE64_LENGTH(length) bytes.
  * where BASE64_LENGTH(len) = (4 * ((LENGTH + 2) / 3))
  */
-static void uuencode (const char *s, const char *store, const int length, const char *tbl)
+static void uuencode (const unsigned char *s, const char *store, const int length, const char *tbl)
 {
 	int i;
 	unsigned char *p = (unsigned char *)store;




More information about the busybox-cvs mailing list