diff options
author | Janne Grunau <janne-libav@jannau.net> | 2012-11-28 17:31:35 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2013-01-12 17:59:40 +0100 |
commit | b6592b402cd245fa4ac74f8eea4e0f9300c62adc (patch) | |
tree | dbbca3c040ac0e8a4c87fd8498352982bcb6a183 | |
parent | 6cd92c3880956ee58fa59aca2d0656b10f506988 (diff) | |
download | ffmpeg-b6592b402cd245fa4ac74f8eea4e0f9300c62adc.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
(cherry picked from commit 3ae69b91668e3d9b65af4007eb5871397cf0b0ab)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-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 792ad57f88..4a231ce899 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -394,6 +394,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 } |