aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-08-28 21:53:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-09-16 00:04:18 +0200
commita9fae76370baf11a03b2c0ea590bb2d2f3f372ce (patch)
tree73cd0be18a6f24f3c81e1eff092e5cafbb123cde /libavcodec
parent61b055bed0968d60eb24a5080fb4ba2bcf73b753 (diff)
downloadffmpeg-a9fae76370baf11a03b2c0ea590bb2d2f3f372ce.tar.gz
avcodec/gdv: Replace assert() checking bitstream by if()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/gdv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/gdv.c b/libavcodec/gdv.c
index a5ce6b799e..f00f3ac145 100644
--- a/libavcodec/gdv.c
+++ b/libavcodec/gdv.c
@@ -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));