From: James Yonan Date: Fri, 26 Aug 2011 00:43:45 +0000 (+0000) Subject: Minor fix to CC_PRINT char class -- treat DEL (ascii 127) X-Git-Tag: v2.3-alpha1~185 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cfa4ebddcfa46ba04705b0291a91d2ac88ab27e;p=thirdparty%2Fopenvpn.git Minor fix to CC_PRINT char class -- treat DEL (ascii 127) as a control char. Version 2.1.13. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7581 e7ae566f-a301-0410-adde-c780ea21d3b5 --- diff --git a/buffer.c b/buffer.c index f3221250f..2f8e4b880 100644 --- a/buffer.c +++ b/buffer.c @@ -720,7 +720,7 @@ char_class (const unsigned char c, const unsigned int flags) return true; if ((flags & CC_DIGIT) && isdigit (c)) return true; - if ((flags & CC_PRINT) && (c >= 32)) /* allow ascii non-control and UTF-8 */ + if ((flags & CC_PRINT) && (c >= 32 && c != 127)) /* allow ascii non-control and UTF-8, consider DEL to be a control */ return true; if ((flags & CC_PUNCT) && ispunct (c)) return true;