Commit 5ae72f54 authored by Janne Grunau's avatar Janne Grunau

flashsv: check for keyframe before using differential coding

Fixes a segfault in te fuzzed sample resolutionchange.flv_s211713.

CC: libav-stable@libav.org
parent 706acb55
...@@ -377,6 +377,11 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data, ...@@ -377,6 +377,11 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
} }
if (has_diff) { 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_start = get_bits(&gb, 8);
s->diff_height = get_bits(&gb, 8); s->diff_height = get_bits(&gb, 8);
av_log(avctx, AV_LOG_DEBUG, av_log(avctx, AV_LOG_DEBUG,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment