summaryrefslogtreecommitdiff
path: root/tools/aviocat.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-17 14:31:13 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-17 14:31:19 +0100
commit9f3a555b84ba5ddc948e0700719ea2f9796acbd5 (patch)
treeaf77de4125cb3c4b52b2c4ab8032ddda5296f3b3 /tools/aviocat.c
parentd2a7314f1e0d8404eb82316ad7f12665c24d48e7 (diff)
parent03f2de5856ec8571fcf5f4cf6dccc713294af545 (diff)
Merge commit '03f2de5856ec8571fcf5f4cf6dccc713294af545'
* commit '03f2de5856ec8571fcf5f4cf6dccc713294af545': aviocat: Check the argv array length before reading element i+1 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools/aviocat.c')
-rw-r--r--tools/aviocat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/aviocat.c b/tools/aviocat.c
index e161d58603..42560cbc41 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) {