mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-18 07:15:04 +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
This commit is contained in:
parent
e2718e7a70
commit
3ae69b9166
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user