[FFmpeg-cvslog] avcodec/ffv1dec: Check that there is enough space for the CRC in the global header
Michael Niedermayer
git at videolan.org
Wed Sep 2 02:26:38 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Sep 2 02:10:31 2015 +0200| [eac161451d248fdd375d403f9bb7d0bec68bc40b] | committer: Michael Niedermayer
avcodec/ffv1dec: Check that there is enough space for the CRC in the global header
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eac161451d248fdd375d403f9bb7d0bec68bc40b
---
libavcodec/ffv1dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 6c035b8..133ad85 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -594,7 +594,7 @@ static int read_extra_header(FFV1Context *f)
unsigned v;
v = av_crc(av_crc_get_table(AV_CRC_32_IEEE), 0,
f->avctx->extradata, f->avctx->extradata_size);
- if (v) {
+ if (v || f->avctx->extradata_size < 4) {
av_log(f->avctx, AV_LOG_ERROR, "CRC mismatch %X!\n", v);
return AVERROR_INVALIDDATA;
}
More information about the ffmpeg-cvslog
mailing list