diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-08-28 22:53:05 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-09-16 01:04:18 +0300 |
commit | a9fae76370baf11a03b2c0ea590bb2d2f3f372ce (patch) | |
tree | 73cd0be18a6f24f3c81e1eff092e5cafbb123cde /libavcodec/gdv.c | |
parent | 61b055bed0968d60eb24a5080fb4ba2bcf73b753 (diff) |
avcodec/gdv: Replace assert() checking bitstream by if()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/gdv.c')
-rw-r--r-- | libavcodec/gdv.c | 3 |
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)); |