diff options
author | Janne Grunau <janne-libav@jannau.net> | 2012-11-28 17:31:35 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2012-11-29 14:15:05 +0100 |
commit | 3ae69b91668e3d9b65af4007eb5871397cf0b0ab (patch) | |
tree | f2cc3a8b78bb22a907a49021f30767cff76d4006 /libavcodec/flashsv.c | |
parent | e2718e7a7006908d7fb9bb003a92f28d58fa6e21 (diff) | |
download | ffmpeg-3ae69b91668e3d9b65af4007eb5871397cf0b0ab.tar.gz |
flashsv: make sure data for zlib priming is available
Fixes a segfault in the fuzzed sample resolutionchange.flv_s314809.
CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/flashsv.c')
-rw-r--r-- | libavcodec/flashsv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index ac57f9f68a..d12e2342c1 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -401,6 +401,11 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data, av_log_missing_feature(avctx, "zlibprime_curr", 1); return AVERROR_PATCHWELCOME; } + if (!s->blocks && (s->zlibprime_curr || s->zlibprime_prev)) { + av_log(avctx, AV_LOG_ERROR, "no data available for zlib " + "priming\n"); + return AVERROR_INVALIDDATA; + } size--; // account for flags byte } |