diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-04 01:18:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-19 03:51:38 +0100 |
commit | a2e0602157ad4813f6d1709d805429206ef70f43 (patch) | |
tree | a7f4840eeb265485dbfdcf4ba494b533b96895fd | |
parent | 75d186ab6ea323484733dcffdb62517dc925e9e2 (diff) | |
download | ffmpeg-a2e0602157ad4813f6d1709d805429206ef70f43.tar.gz |
avcodec/svq1dec: Check init_get_bits8() for failure
Fixes: CID1322313
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a51d4246d8ac96acee735e7e5dedb9d9ef27a594)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/svq1dec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index a95c7c866e..0af4708fa7 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -616,9 +616,12 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data, uint8_t *current; int result, i, x, y, width, height; svq1_pmv *pmv; + int ret; /* initialize bit buffer */ - init_get_bits8(&s->gb, buf, buf_size); + ret = init_get_bits8(&s->gb, buf, buf_size); + if (ret < 0) + return ret; /* decode frame header */ s->frame_code = get_bits(&s->gb, 22); |