Commit b926cc78 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 32de2831
...@@ -295,7 +295,7 @@ static void rac_normalise(RangeCoder *c) ...@@ -295,7 +295,7 @@ static void rac_normalise(RangeCoder *c)
c->low |= *c->src++; c->low |= *c->src++;
} else if (!c->low) { } else if (!c->low) {
c->got_error = 1; c->got_error = 1;
return; c->low = 1;
} }
if (c->range >= RAC_BOTTOM) if (c->range >= RAC_BOTTOM)
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment