diff options
author | Rob Landley <rob@landley.net> | 2013-10-06 17:35:57 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2013-10-06 17:35:57 -0500 |
commit | 507026bca26a38d448a624776c596f722c672262 (patch) | |
tree | 9d756af44ccecafa918c43f3719d99752cab4cdd | |
parent | d277414eb61add9ab0139bc7bb06be705708375a (diff) | |
download | toybox-507026bca26a38d448a624776c596f722c672262.tar.gz |
It's not a problem to exactly fill up the buffer with a run if the next symbol is the terminating symbol. Fixes https://jira.cyanogenmod.org/browse/CYAN-1896
-rw-r--r-- | lib/bunzip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bunzip.c b/lib/bunzip.c index fd40c147..23c25940 100644 --- a/lib/bunzip.c +++ b/lib/bunzip.c @@ -378,7 +378,7 @@ static int read_huffman_data(struct bunzip_data *bd, struct bwdata *bw) literal used is the one at the head of the mtfSymbol array.) */ if (runPos) { runPos = 0; - if (dbufCount+hh >= bd->dbufSize) return RETVAL_DATA_ERROR; + if (dbufCount+hh > bd->dbufSize) return RETVAL_DATA_ERROR; uc = bd->symToByte[bd->mtfSymbol[0]]; byteCount[uc] += hh; |