From 25abc2a9b4cdb39916bb5438d2030f985f813885 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 4 Nov 1996 00:22:26 +0000 Subject: (recover_mode): Fail also if there are too many fields. From Karl Heuer. --- src/stty.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/stty.c') 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; } -- cgit v1.2.3-54-g00ecf