summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-01-26 07:17:30 +0000
committerEric Andersen <andersen@codepoet.org>2004-01-26 07:17:30 +0000
commitf2ec37902a2a6aa54ab616bfa7f6d296bddc9b68 (patch)
tree09653594812d633d592f9f28df041e99139ae3d1 /coreutils
parent7018385fe71329af2f685b7859fbf8f6cedc8325 (diff)
downloadbusybox-w32-f2ec37902a2a6aa54ab616bfa7f6d296bddc9b68.tar.gz
busybox-w32-f2ec37902a2a6aa54ab616bfa7f6d296bddc9b68.tar.bz2
busybox-w32-f2ec37902a2a6aa54ab616bfa7f6d296bddc9b68.zip
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 'coreutils')
-rw-r--r--coreutils/uuencode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index fd3326d80..42f629f48 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -59,7 +59,7 @@ static const char tbl_std[65] = {
59 * buffer of at least 1+BASE64_LENGTH(length) bytes. 59 * buffer of at least 1+BASE64_LENGTH(length) bytes.
60 * where BASE64_LENGTH(len) = (4 * ((LENGTH + 2) / 3)) 60 * where BASE64_LENGTH(len) = (4 * ((LENGTH + 2) / 3))
61 */ 61 */
62static void uuencode (const char *s, const char *store, const int length, const char *tbl) 62static void uuencode (const unsigned char *s, const char *store, const int length, const char *tbl)
63{ 63{
64 int i; 64 int i;
65 unsigned char *p = (unsigned char *)store; 65 unsigned char *p = (unsigned char *)store;