]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5036] Fixed control char test for signed chars
authorFrancis Dupont <fdupont@isc.org>
Sun, 11 Dec 2016 15:41:56 +0000 (16:41 +0100)
committerFrancis Dupont <fdupont@isc.org>
Sun, 11 Dec 2016 15:41:56 +0000 (16:41 +0100)
src/bin/dhcp6/dhcp6_lexer.cc
src/bin/dhcp6/dhcp6_lexer.ll

index eada13014a3edd7be9fb56f0d717e17aa5814f0d..02bad281aadb8c04ec2ab8b80dd9508282ae16f6 100644 (file)
@@ -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 + "\"");
             }
index 73d6620baf36cdfa7f4a294655f62b217b373972..950e1b92077f258504cc098bcaad0ea8d9725411 100644 (file)
@@ -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 + "\"");
             }