mss3: prevent AC state from becoming invalid in rac_normalise()

Fixes division by zero

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-30 18:12:42 +01:00
parent 32de283103
commit b926cc7834
1 changed files with 1 additions and 1 deletions

View File

@ -295,7 +295,7 @@ static void rac_normalise(RangeCoder *c)
c->low |= *c->src++;
} else if (!c->low) {
c->got_error = 1;
return;
c->low = 1;
}
if (c->range >= RAC_BOTTOM)
return;