[FFmpeg-cvslog] ffv1: make sure gob_count is not 0
Michael Niedermayer
git at videolan.org
Sun Oct 14 00:14:05 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 22:33:40 2012 +0200| [670b927aa22125a20b7915014ae41335cbf20ec4] | committer: Michael Niedermayer
ffv1: make sure gob_count is not 0
Fixes division by 0
Fixes CID733736
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=670b927aa22125a20b7915014ae41335cbf20ec4
---
libavcodec/ffv1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 7787070..0a70b65 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;
}
More information about the ffmpeg-cvslog
mailing list