summaryrefslogtreecommitdiff
path: root/libavcodec/fraps.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-09 19:40:59 +0100
committerAnton Khirnov <anton@khirnov.net>2011-11-26 08:35:57 +0100
commit5ace144fe0b7519c389d3ddcdcf7082b4e89b0df (patch)
tree908023cf2d794f6b965c13986a1756b4a31816d2 /libavcodec/fraps.c
parent51f316a997d7a9d3f7571f89392ad5767665b11f (diff)
fraps: check for overread.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/fraps.c')
-rw-r--r--libavcodec/fraps.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index ed33c3eabf..1444eda979 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -111,6 +111,10 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
*/
if(j) dst[i] += dst[i - stride];
else if(Uoff) dst[i] += 0x80;
+ if (get_bits_left(&gb) < 0) {
+ free_vlc(&vlc);
+ return AVERROR_INVALIDDATA;
+ }
}
dst += stride;
}