diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-04 01:13:05 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-04 01:13:05 +0200 |
commit | cbd3cd8eb2de2280d83da5ee875c35581b46a3a3 (patch) | |
tree | 1f076d536d71780044cbb306bde75fc6d4d711f8 | |
parent | f5a6a8336fa21dc6d6b6a9a07fa15f8f2240a840 (diff) | |
download | ffmpeg-cbd3cd8eb2de2280d83da5ee875c35581b46a3a3.tar.gz |
avcodec/vp3: Check init_get_bits8() for failure
Fixes CID1322316
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/vp3.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index f10fa5a8f3..09e6f75ec4 100644 --- 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); |