[FFmpeg-cvslog] flashsv: check for keyframe before using differential coding
Janne Grunau
git at videolan.org
Mon Nov 26 16:17:33 CET 2012
ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Sat Nov 24 15:50:03 2012 +0100| [5ae72f54532960cb9eae82a1c9e8d505106c022b] | committer: Janne Grunau
flashsv: check for keyframe before using differential coding
Fixes a segfault in te fuzzed sample resolutionchange.flv_s211713.
CC: libav-stable at libav.org
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ae72f54532960cb9eae82a1c9e8d505106c022b
---
libavcodec/flashsv.c | 5 +++++
1 file changed, 5 insertions(+)
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,
More information about the ffmpeg-cvslog
mailing list