]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
fuzz: fuzz HTTP1 target
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 8 Jun 2023 12:36:50 +0000 (14:36 +0200)
committerVictor Julien <vjulien@oisf.net>
Tue, 13 Jun 2023 11:48:31 +0000 (13:48 +0200)
As we use the name taken from list-app-layer-protos output,
we want http to translate to HTTP1

src/tests/fuzz/fuzz_applayerparserparse.c

index ac8dc0368581690600e7646146be4c68fb7a5cf7..0ee263fc0b0c94f1ed5393bfe689a431efda72f9 100644 (file)
@@ -59,6 +59,10 @@ int LLVMFuzzerInitialize(int *argc, char ***argv)
             printf("Forcing %s\n", AppProtoToString(forceLayer));
         }
     }
+    // http is the output name, but we want to fuzz HTTP1
+    if (forceLayer == ALPROTO_HTTP) {
+        forceLayer = ALPROTO_HTTP1;
+    }
     return 0;
 }