]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/svq1dec: Check init_get_bits8() for failure
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 3 Sep 2015 23:18:13 +0000 (01:18 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 3 Sep 2015 23:28:26 +0000 (01:28 +0200)
Fixes: CID1322313
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/svq1dec.c

index 8bc4c0c9c2995fbfc475f27bd9d3cdc2b2085ca1..dca99fae4c44bffe283e8e0d5ed9fc6e7603a33f 100644 (file)
@@ -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);