From f2ec37902a2a6aa54ab616bfa7f6d296bddc9b68 Mon Sep 17 00:00:00 2001
From: Eric Andersen <andersen@codepoet.org>
Date: Mon, 26 Jan 2004 07:17:30 +0000
Subject: 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
---
 coreutils/uuencode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'coreutils/uuencode.c')

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] = {
  * 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;
-- 
cgit v1.2.3-55-g6feb