]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
parser: handle "control verbs" without close paren
authorJustin Viiret <justin.viiret@intel.com>
Fri, 3 Feb 2017 00:39:06 +0000 (11:39 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 26 Apr 2017 04:59:02 +0000 (14:59 +1000)
src/parser/Parser.rl
unit/hyperscan/bad_patterns.txt

index 6f4fd80a03bc559fc84247078091630072269061..52b3340c66e79973c9bbb52d07820571e15cddb4 100644 (file)
@@ -569,6 +569,9 @@ unichar readUtf8CodePoint4c(const char *s) {
             assert(0); // Should have thrown a parse error.
             throw LocatedParseError("Unknown control verb");
         };
+        any => {
+            throw LocatedParseError("Unknown control verb");
+        };
     *|;
 
     #############################################################
index d4de452aaf11696e24fb9877bce0eac015d2ce02..d970761a4bdd555a80150829c81e76e88e2a2624 100644 (file)
 138:/(*UNKNOWNVERB)foobar/ #Unknown control verb (*UNKNOWNVERB) at index 0.
 139:/foo(*UTF8)bar/ #(*UTF8) must be at start of expression, encountered at index 5.
 140:/(?i)(*UTF8)foobar/ #(*UTF8) must be at start of expression, encountered at index 6.
+141:/(*@&/ #Unknown control verb at index 2.