diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-06 15:49:12 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-06 15:49:12 +0000 |
commit | e5dbba22afb0600404d18541613f377fde8de9f6 (patch) | |
tree | 1a780e57ab3515fa1f9b76b7984c73014d3085d1 /libbb/uuencode.c | |
parent | 46611179112d69a53690a8ffd366a7d35915aeda (diff) | |
download | busybox-w32-e5dbba22afb0600404d18541613f377fde8de9f6.tar.gz busybox-w32-e5dbba22afb0600404d18541613f377fde8de9f6.tar.bz2 busybox-w32-e5dbba22afb0600404d18541613f377fde8de9f6.zip |
bb_uudecode: now this is the more thorough fix... I hope...
Diffstat (limited to '')
-rw-r--r-- | libbb/uuencode.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
50 | /* Are s[1], s[2] valid or should be assumed 0? */ | 50 | /* Are s[1], s[2] valid or should be assumed 0? */ |
51 | s1 = s2 = 0; | 51 | s1 = s2 = 0; |
52 | length -= 3; /* can be >=0, -1, -2 */ | 52 | length -= 3; /* can be >=0, -1, -2 */ |
53 | if (length != -2) { | 53 | if (length >= -1) { |
54 | s1 = s[1]; | 54 | s1 = s[1]; |
55 | if (length != -1) | 55 | if (length >= 0) |
56 | s2 = s[2]; | 56 | s2 = s[2]; |
57 | } | 57 | } |
58 | *p++ = tbl[s[0] >> 2]; | 58 | *p++ = tbl[s[0] >> 2]; |