[FFmpeg-cvslog] probetest: check command line arguments

Michael Niedermayer git at videolan.org
Sat Oct 13 20:47:04 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 19:58:44 2012 +0200| [80db07adfe8a1ff716af51ca9aaf357280c8b363] | committer: Michael Niedermayer

probetest: check command line arguments

Fixes CID733835
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=80db07adfe8a1ff716af51ca9aaf357280c8b363
---

 tools/probetest.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/probetest.c b/tools/probetest.c
index f8a617d..29c27e4 100644
--- a/tools/probetest.c
+++ b/tools/probetest.c
@@ -63,6 +63,16 @@ int main(int argc, char **argv)
     if(argc >= 3)
         max_size = atoi(argv[2]);
 
+    if (max_size > 1000000000U/8) {
+        fprintf(stderr, "max_size out of bounds\n");
+        return 1;
+    }
+
+    if (retry_count > 1000000000U) {
+        fprintf(stderr, "retry_count out of bounds\n");
+        return 1;
+    }
+
     avcodec_register_all();
     av_register_all();
 



More information about the ffmpeg-cvslog mailing list