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:
a78f554
)
hq_hqa: Validate get_vlc2 return value
author
Luca Barbato
<lu_zero@gentoo.org>
Tue, 21 Apr 2015 12:42:21 +0000
(14:42 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Wed, 22 Apr 2015 10:27:43 +0000
(12:27 +0200)
The `hq_ac_vlc.table` is incomplete, so unaccounted symbol return -1
as value.
libavcodec/hq_hqa.c
patch
|
blob
|
history
diff --git
a/libavcodec/hq_hqa.c
b/libavcodec/hq_hqa.c
index
4b18eae
..
ae378e6
100644
(file)
--- a/
libavcodec/hq_hqa.c
+++ b/
libavcodec/hq_hqa.c
@@
-75,7
+75,10
@@
static int hq_decode_block(HQContext *c, GetBitContext *gb, int16_t block[64],
}
for (;;) {
- val = get_vlc2(gb, c->hq_ac_vlc.table, 9, 2);
+ val = get_vlc2(gb, c->hq_ac_vlc.table, 9, 2);
+ if (val < 0)
+ return AVERROR_INVALIDDATA;
+
pos += ff_hq_ac_skips[val];
if (pos >= 64)
break;