diff options
author | Martin Storsjö <martin@martin.st> | 2014-01-16 11:58:03 +0400 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2014-01-17 11:31:53 +0400 |
commit | 03f2de5856ec8571fcf5f4cf6dccc713294af545 (patch) | |
tree | f187bb905ad4d1739cb75f21eb271f1bbceaa081 | |
parent | aab40bbfd5a7df1489500656a95448a0c53c1bd5 (diff) |
aviocat: Check the argv array length before reading element i+1
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | tools/aviocat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/aviocat.c b/tools/aviocat.c index 52a96bde2f..9284db1875 100644 --- a/tools/aviocat.c +++ b/tools/aviocat.c @@ -43,7 +43,7 @@ int main(int argc, char **argv) avformat_network_init(); for (i = 1; i < argc; i++) { - if (!strcmp(argv[i], "-b")) { + if (!strcmp(argv[i], "-b") && i + 1 < argc) { bps = atoi(argv[i + 1]); i++; } else if (!input_url) { |