summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-02 02:10:31 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-02 02:10:31 +0200
commiteac161451d248fdd375d403f9bb7d0bec68bc40b (patch)
tree075714529460cb4f70b894b247b111d9916b1ec5 /libavcodec/ffv1dec.c
parent1376084dcbab53cbaea8047cf7ec85af3c8570ce (diff)
downloadffmpeg-eac161451d248fdd375d403f9bb7d0bec68bc40b.tar.gz
avcodec/ffv1dec: Check that there is enough space for the CRC in the global header
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ffv1dec.c')
-rw-r--r--libavcodec/ffv1dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 6c035b8eab..133ad851d6 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;
}