Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-11-24 18:50:03 +0400
committerJanne Grunau <janne-libav@jannau.net>2012-11-26 13:26:01 +0400
commit5ae72f54532960cb9eae82a1c9e8d505106c022b (patch)
treef80e9233e70789460225a74ecc128a7b5361b529 /libavcodec
parent706acb558a38eba633056773280155d66c2f4b24 (diff)
flashsv: check for keyframe before using differential coding
Fixes a segfault in te fuzzed sample resolutionchange.flv_s211713. CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/flashsv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index 2ba32641b7..ac57f9f68a 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -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,