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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user