[Ffmpeg-cvslog] r7777 - trunk/libavcodec/lzo.c
reimar
subversion
Wed Jan 31 11:29:58 CET 2007
Author: reimar
Date: Wed Jan 31 11:29:58 2007
New Revision: 7777
Modified:
trunk/libavcodec/lzo.c
Log:
Add two extra needed bounds checks
Modified: trunk/libavcodec/lzo.c
==============================================================================
--- trunk/libavcodec/lzo.c (original)
+++ trunk/libavcodec/lzo.c Wed Jan 31 11:29:58 2007
@@ -182,6 +182,8 @@
x = GETB(c);
if (x < 16) c.error |= LZO_ERROR;
}
+ if (c.in > c.in_end)
+ c.error |= LZO_INPUT_DEPLETED;
while (!c.error) {
int cnt, back;
if (x > 15) {
@@ -209,6 +211,10 @@
cnt = get_len(&c, x, 15);
copy(&c, cnt + 3);
x = GETB(c);
+ if (c.in > c.in_end) {
+ c.error |= LZO_INPUT_DEPLETED;
+ continue;
+ }
if (x >> 4)
continue;
cnt = 1;
More information about the ffmpeg-cvslog
mailing list