summaryrefslogtreecommitdiff
path: root/src/stty.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stty.c')
-rw-r--r--src/stty.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stty.c b/src/stty.c
index f666a9508..243343dae 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -1510,6 +1510,11 @@ recover_mode (char *arg, struct termios *mode)
mode->c_cc[i] = chr;
arg += n;
}
+
+ /* Fail if there are too many fields. */
+ if (*arg != '\0')
+ return 0;
+
return 1;
}