From: Ralph Corderoy Date: Fri, 21 Oct 2016 20:18:38 +0000 (+0100) Subject: Add FIXME raising if iscntrl(3) test should be based on isprint(3) X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/a344ed5d79d7bf9e78281b8effd0f70963e834bf?ds=sidebyside Add FIXME raising if iscntrl(3) test should be based on isprint(3) !iscntrl blocks characters that could be isspace or isblank whereas isprint would let them through unharmed. --- diff --git a/uip/mhparse.c b/uip/mhparse.c index 4cff8b9a..0c2c17cd 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -4248,6 +4248,10 @@ noiconv: q = buffer; bufsize = sizeof(buffer); for (p = pm->pm_value; *p != '\0' && bufsize > 1; p++, q++, bufsize--) { + /* FIXME: !iscntrl should perhaps be isprint as that allows all + * classes bar cntrl, whereas the cntrl class can include those + * in space and blank. + * http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html */ if (isascii((unsigned char) *p) && !iscntrl((unsigned char) *p)) *q = *p; else