From 8684cbb5cc2c461e3795fba19ad7386db37cf499 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 18 Nov 2009 11:34:43 +0100 Subject: libbb: robustify isXXXX(). +39 bytes Signed-off-by: Denys Vlasenko --- loginutils/getty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'loginutils') diff --git a/loginutils/getty.c b/loginutils/getty.c index f44d387..20411b0 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -487,7 +487,7 @@ static char *get_logname(char *logname, unsigned size_logname, case CTL('D'): exit(EXIT_SUCCESS); default: - if (!isprint(ascval)) { + if (ascval < ' ') { /* ignore garbage characters */ } else if ((int)(bp - logname) >= size_logname - 1) { bb_error_msg_and_die("%s: input overrun", op->tty); -- cgit v1.1