summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-11-24 15:50:03 +0100
committerJanne Grunau <janne-libav@jannau.net>2012-11-26 10:26:01 +0100
commit5ae72f54532960cb9eae82a1c9e8d505106c022b (patch)
treef80e9233e70789460225a74ecc128a7b5361b529
parent706acb558a38eba633056773280155d66c2f4b24 (diff)
downloadffmpeg-streaming-5ae72f54532960cb9eae82a1c9e8d505106c022b.zip
ffmpeg-streaming-5ae72f54532960cb9eae82a1c9e8d505106c022b.tar.gz
flashsv: check for keyframe before using differential coding
Fixes a segfault in te fuzzed sample resolutionchange.flv_s211713. CC: libav-stable@libav.org
-rw-r--r--libavcodec/flashsv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index 2ba3264..ac57f9f 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,
OpenPOWER on IntegriCloud