diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-04 01:18:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-04 01:28:26 +0200 |
commit | a51d4246d8ac96acee735e7e5dedb9d9ef27a594 (patch) | |
tree | 2e0b30238f6995da792397458120e250c370abab | |
parent | f1593e4ca564cdb7f3194a9eee1dea16df41142d (diff) | |
download | ffmpeg-a51d4246d8ac96acee735e7e5dedb9d9ef27a594.tar.gz |
avcodec/svq1dec: Check init_get_bits8() for failure
Fixes: CID1322313
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 8bc4c0c9c2..dca99fae4c 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -618,9 +618,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); |