diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-13 19:58:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-13 20:35:56 +0200 |
commit | 80db07adfe8a1ff716af51ca9aaf357280c8b363 (patch) | |
tree | 20fd76381d341afcdaa526cec279b73be48ef5b5 | |
parent | 8ab0b9cabacad57cad7c26144baa544fab9c2ba7 (diff) | |
download | ffmpeg-80db07adfe8a1ff716af51ca9aaf357280c8b363.tar.gz |
probetest: check command line arguments
Fixes CID733835
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | tools/probetest.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/probetest.c b/tools/probetest.c index f8a617ddea..29c27e4bf5 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(); |