summaryrefslogtreecommitdiffstats
path: root/usr.bin/wall
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-05-14 09:37:54 +0000
committerache <ache@FreeBSD.org>1997-05-14 09:37:54 +0000
commitec9763a7fa233e570da2dfe537088a809741fc8b (patch)
treec0d344675391e7c7cbb1879fcb710e7a6fc66d08 /usr.bin/wall
parent180626ba8e748bb583c79ff5cc6a994e12be4558 (diff)
downloadFreeBSD-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.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