# HG changeset patch # User Rob Landley # Date 1381098957 18000 # Node ID 7b6fbc0475d81aec5b97985fe98e88107b959ab3 # Parent f2e8247a4fd045d82b2e220bd8d5201d1574ac44 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 diff -r f2e8247a4fd0 -r 7b6fbc0475d8 lib/bunzip.c --- a/lib/bunzip.c Fri Oct 04 14:32:39 2013 -0500 +++ b/lib/bunzip.c Sun Oct 06 17:35:57 2013 -0500 @@ -378,7 +378,7 @@ 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;