mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
flashsv: check for keyframe before using differential coding
Fixes a segfault in te fuzzed sample resolutionchange.flv_s211713. CC: libav-stable@libav.org
This commit is contained in:
parent
706acb558a
commit
5ae72f5453
@ -377,6 +377,11 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
|
||||
if (has_diff) {
|
||||
if (!s->keyframe) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"inter frame without keyframe\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
s->diff_start = get_bits(&gb, 8);
|
||||
s->diff_height = get_bits(&gb, 8);
|
||||
av_log(avctx, AV_LOG_DEBUG,
|
||||
|
Loading…
Reference in New Issue
Block a user