Fixes a segfault in the fuzzed sample resolutionchange.flv_s314809.
---

already ok-ed by Kostya on irc, will commit tomorrow if nobody objects

 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
             }
 
-- 
1.7.12.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to