OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f7a328
)
svq1dec: Validate the stages value strictly
author
Luca Barbato
<lu_zero@gentoo.org>
Mon, 2 Feb 2015 01:22:34 +0000
(
02:22
+0100)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Tue, 3 Feb 2015 15:23:21 +0000
(15:23 +0000)
It can be less than -1.
Bug-Id: CID
1194397
/ CID
1194398
CC: libav-stable@libav.org
libavcodec/svq1dec.c
patch
|
blob
|
history
diff --git
a/libavcodec/svq1dec.c
b/libavcodec/svq1dec.c
index
789a013
..
909ace7
100644
(file)
--- 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);