avcodec/gdv: Replace assert() checking bitstream by if()
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 28 Aug 2019 19:53:05 +0000 (21:53 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 15 Sep 2019 22:04:18 +0000 (00:04 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/gdv.c

index a5ce6b7..f00f3ac 100644 (file)
@@ -358,7 +358,8 @@ static int decompress_68(AVCodecContext *avctx, unsigned skip, unsigned use8)
                     if (val != ((1 << lbits) - 1)) {
                         break;
                     }
-                    assert(lbits < 16);
+                    if (lbits >= 16)
+                        return AVERROR_INVALIDDATA;
                 }
                 for (i = 0; i < len; i++) {
                     bytestream2_put_byte(pb, bytestream2_get_byte(gb));