aboutsummaryrefslogtreecommitdiffstats
path: root/tools/aviocat.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2014-01-16 09:58:03 +0200
committerMartin Storsjö <martin@martin.st>2014-01-17 09:31:53 +0200
commit03f2de5856ec8571fcf5f4cf6dccc713294af545 (patch)
treef187bb905ad4d1739cb75f21eb271f1bbceaa081 /tools/aviocat.c
parentaab40bbfd5a7df1489500656a95448a0c53c1bd5 (diff)
downloadffmpeg-03f2de5856ec8571fcf5f4cf6dccc713294af545.tar.gz
aviocat: Check the argv array length before reading element i+1
Signed-off-by: Martin Storsjö <martin@martin.st>
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 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) {