[FFmpeg-cvslog] avcodec/svq1dec: Check init_get_bits8() for failure
Michael Niedermayer
git at videolan.org
Fri Sep 4 01:40:53 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Sep 4 01:18:13 2015 +0200| [a51d4246d8ac96acee735e7e5dedb9d9ef27a594] | committer: Michael Niedermayer
avcodec/svq1dec: Check init_get_bits8() for failure
Fixes: CID1322313
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a51d4246d8ac96acee735e7e5dedb9d9ef27a594
---
libavcodec/svq1dec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 8bc4c0c..dca99fa 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);
More information about the ffmpeg-cvslog
mailing list