[FFmpeg-cvslog] ffv1: make sure gob_count is not 0
Michael Niedermayer
git at videolan.org
Thu Oct 25 21:29:19 CEST 2012
ffmpeg | branch: release/0.10 | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 22:33:40 2012 +0200| [cff9f07d391f4880ce923f86163d41251124641e] | 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>
(cherry picked from commit 670b927aa22125a20b7915014ae41335cbf20ec4)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cff9f07d391f4880ce923f86163d41251124641e
---
libavcodec/ffv1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 4d3a528..8875c6e 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -993,7 +993,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 -1;
}
More information about the ffmpeg-cvslog
mailing list