diff options
author | ache <ache@FreeBSD.org> | 1997-05-14 09:37:54 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-05-14 09:37:54 +0000 |
commit | ec9763a7fa233e570da2dfe537088a809741fc8b (patch) | |
tree | c0d344675391e7c7cbb1879fcb710e7a6fc66d08 /usr.bin/wall | |
parent | 180626ba8e748bb583c79ff5cc6a994e12be4558 (diff) | |
download | FreeBSD-src-ec9763a7fa233e570da2dfe537088a809741fc8b.zip FreeBSD-src-ec9763a7fa233e570da2dfe537088a809741fc8b.tar.gz |
Add locale-independent control checks for security reason
Diffstat (limited to 'usr.bin/wall')
-rw-r--r-- | usr.bin/wall/wall.c | 6 |
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; |