summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-07 18:21:36 +0200
committerwm4 <wm4@nowhere>2014-08-07 18:21:36 +0200
commit5906041343bf79afe0247aa4c0c7cb731003ca64 (patch)
treee98a1859740e81e1b51a03ba3498df823671cb43 /input
parent886ac0969984aade981f0a3b948f9497cd76b3a1 (diff)
downloadmpv-5906041343bf79afe0247aa4c0c7cb731003ca64.tar.bz2
mpv-5906041343bf79afe0247aa4c0c7cb731003ca64.tar.xz
input: fix off by one error in command parser
Should fix #989.
Diffstat (limited to 'input')
-rw-r--r--input/cmd_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/input/cmd_parse.c b/input/cmd_parse.c
index fd7e178e73..db44ccaf5e 100644
--- a/input/cmd_parse.c
+++ b/input/cmd_parse.c
@@ -306,7 +306,7 @@ struct mp_cmd *mp_input_parse_cmd_strv(struct mp_log *log, int def_flags,
bstr args[MP_CMD_MAX_ARGS];
int num = 0;
for (; argv[num]; num++) {
- if (num > MP_CMD_MAX_ARGS) {
+ if (num >= MP_CMD_MAX_ARGS) {
mp_err(log, "%s: too many arguments.\n", location);
return NULL;
}