[FFmpeg-cvslog] tscc2: fix out of array access
Michael Niedermayer
git at videolan.org
Fri Oct 12 04:26:42 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Oct 12 02:26:50 2012 +0200| [927d866a9961c17597744436c8508703c2dc8277] | committer: Michael Niedermayer
tscc2: fix out of array access
Fixes CID732260
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=927d866a9961c17597744436c8508703c2dc8277
---
libavcodec/tscc2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/tscc2.c b/libavcodec/tscc2.c
index 483e97f..8692819 100644
--- a/libavcodec/tscc2.c
+++ b/libavcodec/tscc2.c
@@ -173,7 +173,7 @@ static int tscc2_decode_mb(TSCC2Context *c, int *q, int vlc_set,
if (ac == 0x1000)
ac = get_bits(gb, 12);
bpos += ac & 0xF;
- if (bpos >= 64)
+ if (bpos >= 16)
return AVERROR_INVALIDDATA;
val = sign_extend(ac >> 4, 8);
c->block[tscc2_zigzag[bpos++]] = val;
More information about the ffmpeg-cvslog
mailing list