aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-08-28 21:53:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-11 20:18:47 +0100
commit0d1e3b33ed3a5d9131c366ab3a46c36aae5c452e (patch)
tree1ae6e8efe0fde34cddb855f96b3a7daf2a4c3074
parent4b68a455e20cceeac0b9ae989fb5663a0e47a963 (diff)
downloadffmpeg-0d1e3b33ed3a5d9131c366ab3a46c36aae5c452e.tar.gz
avcodec/gdv: Replace assert() checking bitstream by if()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit a9fae76370baf11a03b2c0ea590bb2d2f3f372ce) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/gdv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/gdv.c b/libavcodec/gdv.c
index d828421199..d280c13dc9 100644
--- a/libavcodec/gdv.c
+++ b/libavcodec/gdv.c
@@ -306,7 +306,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));