summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/wall/wall.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/wall/wall.c b/usr.bin/wall/wall.c
index 12c4387..f2b8a9d 100644
--- a/usr.bin/wall/wall.c
+++ b/usr.bin/wall/wall.c
@@ -183,8 +183,10 @@ makemsg(fname)
putc('\r', fp);
putc('\n', fp);
cnt = 0;
- } else if ( !isprint(ch) && !isspace(ch)
- && ch != '\007' && ch != '\010'
+ } else if ( ( (ch & 0x7F) < ' ' /* locale-independent */
+ || (!isprint(ch) && !isspace(ch))
+ )
+ && strchr("\a\f\t\v\b\r\n", ch) == NULL
) {
if (ch & 0x80) {
ch &= 0x7F;
OpenPOWER on IntegriCloud