From e5dbba22afb0600404d18541613f377fde8de9f6 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 6 Aug 2007 15:49:12 +0000 Subject: bb_uudecode: now this is the more thorough fix... I hope... --- libbb/uuencode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libbb/uuencode.c') diff --git a/libbb/uuencode.c b/libbb/uuencode.c index 57d1cbfd2..f525322f8 100644 --- a/libbb/uuencode.c +++ b/libbb/uuencode.c @@ -50,9 +50,9 @@ void bb_uuencode(char *p, const void *src, int length, const char *tbl) /* Are s[1], s[2] valid or should be assumed 0? */ s1 = s2 = 0; length -= 3; /* can be >=0, -1, -2 */ - if (length != -2) { + if (length >= -1) { s1 = s[1]; - if (length != -1) + if (length >= 0) s2 = s[2]; } *p++ = tbl[s[0] >> 2]; -- cgit v1.2.3