toybox

changeset 1078:7b6fbc0475d8

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
author Rob Landley <rob@landley.net>
date Sun, 06 Oct 2013 17:35:57 -0500
parents f2e8247a4fd0
children f4f543ff8490
files lib/bunzip.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/lib/bunzip.c	Fri Oct 04 14:32:39 2013 -0500
     1.2 +++ b/lib/bunzip.c	Sun Oct 06 17:35:57 2013 -0500
     1.3 @@ -378,7 +378,7 @@
     1.4         literal used is the one at the head of the mtfSymbol array.) */
     1.5      if (runPos) {
     1.6        runPos = 0;
     1.7 -      if (dbufCount+hh >= bd->dbufSize) return RETVAL_DATA_ERROR;
     1.8 +      if (dbufCount+hh > bd->dbufSize) return RETVAL_DATA_ERROR;
     1.9  
    1.10        uc = bd->symToByte[bd->mtfSymbol[0]];
    1.11        byteCount[uc] += hh;