[FFmpeg-cvslog] flashsv: make sure data for zlib priming is available

Janne Grunau git at videolan.org
Fri Nov 30 14:55:10 CET 2012


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Wed Nov 28 17:31:35 2012 +0100| [3ae69b91668e3d9b65af4007eb5871397cf0b0ab] | committer: Janne Grunau

flashsv: make sure data for zlib priming is available

Fixes a segfault in the fuzzed sample resolutionchange.flv_s314809.

CC: libav-stable at libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ae69b91668e3d9b65af4007eb5871397cf0b0ab
---

 libavcodec/flashsv.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index ac57f9f..d12e234 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -401,6 +401,11 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
                     av_log_missing_feature(avctx, "zlibprime_curr", 1);
                     return AVERROR_PATCHWELCOME;
                 }
+                if (!s->blocks && (s->zlibprime_curr || s->zlibprime_prev)) {
+                    av_log(avctx, AV_LOG_ERROR, "no data available for zlib "
+                           "priming\n");
+                    return AVERROR_INVALIDDATA;
+                }
                 size--; // account for flags byte
             }
 



More information about the ffmpeg-cvslog mailing list