From: Francis Dupont Date: Sun, 11 Dec 2016 15:41:56 +0000 (+0100) Subject: [5036] Fixed control char test for signed chars X-Git-Tag: trac5017_base~2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af79ebabdc54c36cb0759840e2f7ea6f22107259;p=thirdparty%2Fkea.git [5036] Fixed control char test for signed chars --- diff --git a/src/bin/dhcp6/dhcp6_lexer.cc b/src/bin/dhcp6/dhcp6_lexer.cc index eada13014a..02bad281aa 100644 --- a/src/bin/dhcp6/dhcp6_lexer.cc +++ b/src/bin/dhcp6/dhcp6_lexer.cc @@ -2641,7 +2641,7 @@ YY_RULE_SETUP } break; default: - if (c < 0x20) { + if ((c > 0) && (c < 0x20)) { // impossible condition driver.error(driver.loc_, "Invalid control in \"" + raw + "\""); } diff --git a/src/bin/dhcp6/dhcp6_lexer.ll b/src/bin/dhcp6/dhcp6_lexer.ll index 73d6620baf..950e1b9207 100644 --- a/src/bin/dhcp6/dhcp6_lexer.ll +++ b/src/bin/dhcp6/dhcp6_lexer.ll @@ -968,7 +968,7 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence} } break; default: - if (c < 0x20) { + if ((c >= 0) && (c < 0x20)) { // impossible condition driver.error(driver.loc_, "Invalid control in \"" + raw + "\""); }