From c8f9a8d3c0f9e5d47cc650bf0425926b03e8bbc6 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 16 Sep 2010 18:10:04 +0200 Subject: move read_base64 to libbb/uuencode.c Signed-off-by: Denys Vlasenko --- mailutils/mail.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mailutils') diff --git a/mailutils/mail.c b/mailutils/mail.c index 89db66166..9b4bebce5 100644 --- a/mailutils/mail.c +++ b/mailutils/mail.c @@ -116,16 +116,15 @@ void FAST_FUNC encode_base64(char *fname, const char *text, const char *eol) SRC_BUF_SIZE = 45, /* This *MUST* be a multiple of 3 */ DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3), }; - #define src_buf text + char src[SRC_BUF_SIZE]; FILE *fp = fp; ssize_t len = len; char dst_buf[DST_BUF_SIZE + 1]; if (fname) { fp = (NOT_LONE_DASH(fname)) ? xfopen_for_read(fname) : (FILE *)text; - src_buf = bb_common_bufsiz1; - // N.B. strlen(NULL) segfaults! + src_buf = src; } else if (text) { // though we do not call uuencode(NULL, NULL) explicitly // still we do not want to break things suddenly -- cgit v1.2.3