From 670b927aa22125a20b7915014ae41335cbf20ec4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 13 Oct 2012 22:33:40 +0200 Subject: [PATCH] ffv1: make sure gob_count is not 0 Fixes division by 0 Fixes CID733736 Signed-off-by: Michael Niedermayer --- libavcodec/ffv1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index 778707003f..0a70b6551f 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -1120,7 +1120,7 @@ static av_cold int encode_init(AVCodecContext *avctx) } } gob_count= strtol(p, &next, 0); - if(next==p || gob_count <0){ + if(next==p || gob_count <=0){ av_log(avctx, AV_LOG_ERROR, "2Pass file invalid\n"); return AVERROR_INVALIDDATA; }