git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5a6a83
)
avcodec/vp3: Check init_get_bits8() for failure
author
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 3 Sep 2015 23:13:05 +0000
(
01:13
+0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 3 Sep 2015 23:13:05 +0000
(
01:13
+0200)
Fixes CID1322316
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/vp3.c
patch
|
blob
|
history
diff --git
a/libavcodec/vp3.c
b/libavcodec/vp3.c
index
f10fa5a
..
09e6f75
100644
(file)
--- a/
libavcodec/vp3.c
+++ b/
libavcodec/vp3.c
@@
-2475,6
+2475,7
@@
static av_cold int theora_decode_init(AVCodecContext *avctx)
const uint8_t *header_start[3];
int header_len[3];
int i;
+ int ret;
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
@@
-2494,7
+2495,9
@@
static av_cold int theora_decode_init(AVCodecContext *avctx)
for (i = 0; i < 3; i++) {
if (header_len[i] <= 0)
continue;
- init_get_bits8(&gb, header_start[i], header_len[i]);
+ ret = init_get_bits8(&gb, header_start[i], header_len[i]);
+ if (ret < 0)
+ return ret;
ptype = get_bits(&gb, 8);