[FFmpeg-cvslog] avcodec/gdv: Replace assert() checking bitstream by if()
Michael Niedermayer
git at videolan.org
Mon Sep 16 02:00:15 EEST 2019
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Aug 28 21:53:05 2019 +0200| [a9fae76370baf11a03b2c0ea590bb2d2f3f372ce] | committer: Michael Niedermayer
avcodec/gdv: Replace assert() checking bitstream by if()
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a9fae76370baf11a03b2c0ea590bb2d2f3f372ce
---
libavcodec/gdv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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));
More information about the ffmpeg-cvslog
mailing list