Commit d6af26c5 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/lzo: Fix integer overflow

Embargoed-till: 2014-06-27 requested by researcher, but embargo broken by libav today (git and mailing list)

Fixes: LMS-2014-06-16-4
Found-by: 's avatar"Don A. Bailey" <donb@securitymouse.com>
See: ccda51b1Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b222e077
......@@ -65,8 +65,13 @@ static inline int get_len(LZOContext *c, int x, int mask)
{
int cnt = x & mask;
if (!cnt) {
while (!(x = get_byte(c)))
while (!(x = get_byte(c))) {
if (cnt >= INT_MAX - 1000) {
c->error |= AV_LZO_ERROR;
break;
}
cnt += 255;
}
cnt += mask + x;
}
return cnt;
......
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