]> granicus.if.org Git - re2c/commitdiff
- Check for illegal chars with 0Xnnnn notation
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Thu, 29 Dec 2005 15:49:20 +0000 (15:49 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Thu, 29 Dec 2005 15:49:20 +0000 (15:49 +0000)
actions.cc

index 53bcc8d4e3071fc5367a1daeeada42c7d189b8ff..3e7c925576c4e6b97b5970fd37045c8d7c873c7d 100644 (file)
@@ -574,6 +574,11 @@ uint Scanner::unescape(SubStr &s) const
                               + (uint)((p3 - hex) <<  4)
                               + (uint)((p4 - hex));
 
+                       if (v >= nRealChars)
+                       {
+                               fatal("Illegal hexadecimal character code");
+                       }
+
                        return v;
                }