flashsv: check for keyframe before using differential coding
Fixes a segfault in te fuzzed sample resolutionchange.flv_s211713.
CC: libav-stable@libav.org
(cherry picked from commit 5ae72f5453
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:

committed by
Reinhard Tartler

parent
d282e5ce72
commit
522e97bd9e
@@ -370,6 +370,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,
|
||||||
|
Reference in New Issue
Block a user