Commit 670b927a authored by Michael Niedermayer's avatar Michael Niedermayer

ffv1: make sure gob_count is not 0

Fixes division by 0
Fixes CID733736
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f70a651b
...@@ -1120,7 +1120,7 @@ static av_cold int encode_init(AVCodecContext *avctx) ...@@ -1120,7 +1120,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
} }
} }
gob_count= strtol(p, &next, 0); 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"); av_log(avctx, AV_LOG_ERROR, "2Pass file invalid\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment