aboutsummaryrefslogtreecommitdiff
path: root/mailutils/mail.c
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-09-16 18:10:04 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-09-16 18:10:04 +0200
commitc8f9a8d3c0f9e5d47cc650bf0425926b03e8bbc6 (patch)
treeba79dcd0305b69d87009b9dc584f7cc5c844b4a2 /mailutils/mail.c
parent9fe98f701d40835db32baa12c94b661d40231ea4 (diff)
downloadbusybox-w32-c8f9a8d3c0f9e5d47cc650bf0425926b03e8bbc6.tar.gz
busybox-w32-c8f9a8d3c0f9e5d47cc650bf0425926b03e8bbc6.tar.bz2
busybox-w32-c8f9a8d3c0f9e5d47cc650bf0425926b03e8bbc6.zip
move read_base64 to libbb/uuencode.c
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'mailutils/mail.c')
-rw-r--r--mailutils/mail.c5
1 files changed, 2 insertions, 3 deletions
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)
116 SRC_BUF_SIZE = 45, /* This *MUST* be a multiple of 3 */ 116 SRC_BUF_SIZE = 45, /* This *MUST* be a multiple of 3 */
117 DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3), 117 DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3),
118 }; 118 };
119
120#define src_buf text 119#define src_buf text
120 char src[SRC_BUF_SIZE];
121 FILE *fp = fp; 121 FILE *fp = fp;
122 ssize_t len = len; 122 ssize_t len = len;
123 char dst_buf[DST_BUF_SIZE + 1]; 123 char dst_buf[DST_BUF_SIZE + 1];
124 124
125 if (fname) { 125 if (fname) {
126 fp = (NOT_LONE_DASH(fname)) ? xfopen_for_read(fname) : (FILE *)text; 126 fp = (NOT_LONE_DASH(fname)) ? xfopen_for_read(fname) : (FILE *)text;
127 src_buf = bb_common_bufsiz1; 127 src_buf = src;
128 // N.B. strlen(NULL) segfaults!
129 } else if (text) { 128 } else if (text) {
130 // though we do not call uuencode(NULL, NULL) explicitly 129 // though we do not call uuencode(NULL, NULL) explicitly
131 // still we do not want to break things suddenly 130 // still we do not want to break things suddenly