aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/fraps.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-09 19:40:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-09 19:40:59 +0100
commit82a1d575757d5bc9b0b218fe89c77f8de06a7d39 (patch)
treef6214dc848cc5b9b62a9706ea5d3a52d65a378cf /libavcodec/fraps.c
parent46082e6186343f6453c9fe06c3b8966778560b13 (diff)
downloadffmpeg-82a1d575757d5bc9b0b218fe89c77f8de06a7d39.tar.gz
fraps: check overread per sample instead of per line
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/fraps.c')
-rw-r--r--libavcodec/fraps.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index ebcc1013e6..bcce97cb75 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -112,12 +112,12 @@ 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 -1;
+ }
}
dst += stride;
- if(get_bits_left(&gb) < 0){
- free_vlc(&vlc);
- return -1;
- }
}
free_vlc(&vlc);
return 0;