ffv1: make sure gob_count is not 0

Fixes division by 0
Fixes CID733736

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-13 22:33:40 +02:00
parent f70a651b3f
commit 670b927aa2

View File

@ -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;
}