mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
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 3ae69b9166)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
committed by
Reinhard Tartler
parent
6cd92c3880
commit
b6592b402c
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user