Commit 348ef44d authored by vitor's avatar vitor

Test a var for overflow just after it is set

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15223 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 37a4adee
......@@ -251,11 +251,11 @@ static int eval_refl(int *refl, const int16_t *coefs, RA144Context *ractx)
for (j=0; j <= i; j++)
bp1[j] = ((bp2[j] - ((refl[i+1] * bp2[i-j]) >> 12)) * (0x1000000 / b)) >> 12;
refl[i] = bp1[i];
if ((unsigned) bp1[i] + 0x1000 > 0x1fff)
return 1;
refl[i] = bp1[i];
FFSWAP(int *, bp1, bp2);
}
return 0;
......
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