diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2015-02-02 02:22:34 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-02-03 15:23:21 +0000 |
commit | 9b8c8a9395c849639aea0f6b5300e991e93c3a73 (patch) | |
tree | d409fad51e49301128be8df6b41af1ef3ebe3431 /libavcodec | |
parent | 6f7a32839d1b913be8170e91c3ac9816b314da21 (diff) | |
download | ffmpeg-9b8c8a9395c849639aea0f6b5300e991e93c3a73.tar.gz |
svq1dec: Validate the stages value strictly
It can be less than -1.
Bug-Id: CID 1194397 / CID 1194398
CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/svq1dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 789a0132fb..909ace7b7f 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -191,7 +191,7 @@ static int svq1_decode_block_intra(GetBitContext *bitbuf, uint8_t *pixels, continue; /* skip vector */ } - if (stages > 0 && level >= 4) { + if ((stages > 0 && level >= 4) || stages < 0) { av_dlog(NULL, "Error (svq1_decode_block_intra): invalid vector: stages=%i level=%i\n", stages, level); @@ -253,7 +253,7 @@ static int svq1_decode_block_non_intra(GetBitContext *bitbuf, uint8_t *pixels, if (stages == -1) continue; /* skip vector */ - if ((stages > 0) && (level >= 4)) { + if ((stages > 0 && level >= 4) || stages < 0) { av_dlog(NULL, "Error (svq1_decode_block_non_intra): invalid vector: stages=%i level=%i\n", stages, level); |