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

Janne Grunau git at videolan.org
Thu Jan 17 02:31:00 CET 2013


ffmpeg | branch: release/0.10 | Janne Grunau <janne-libav at jannau.net> | Wed Nov 28 17:31:35 2012 +0100| [b6592b402cd245fa4ac74f8eea4e0f9300c62adc] | committer: Reinhard Tartler

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
(cherry picked from commit 3ae69b91668e3d9b65af4007eb5871397cf0b0ab)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>

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

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

diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index 792ad57..4a231ce 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -394,6 +394,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