diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2006-11-06 06:13:29 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2006-11-06 06:13:29 +0000 |
commit | f4e31985da4ba620bb32347c0ef30de71727116c (patch) | |
tree | ce78254940c5610dc0e88fca960b228c992f25d0 /libavcodec/fraps.c | |
parent | 3f509ba1222e2a08249ad626bd8e4f8ad9007e63 (diff) | |
download | ffmpeg-f4e31985da4ba620bb32347c0ef30de71727116c.tar.gz |
Check for symbol count
Originally committed as revision 6910 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/fraps.c')
-rw-r--r-- | libavcodec/fraps.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c index aff656688c..18d2700492 100644 --- a/libavcodec/fraps.c +++ b/libavcodec/fraps.c @@ -140,6 +140,10 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w, s->nodes[i].sym = i; s->nodes[i].count = LE_32(src); s->nodes[i].n0 = -2; + if(s->nodes[i].count < 0) { + av_log(s->avctx, AV_LOG_ERROR, "Symbol count < 0\n"); + return -1; + } src += 4; sum += s->nodes[i].count; } |