generated from micronaut-projects/micronaut-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
fuzzing-tests/src/main/java/io/micronaut/fuzzing/http/EmbeddedHttp2Target.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package io.micronaut.fuzzing.http; | ||
|
||
import io.micronaut.fuzzing.FuzzTarget; | ||
import io.micronaut.fuzzing.runner.LocalJazzerRunner; | ||
|
||
import java.util.Map; | ||
|
||
@FuzzTarget | ||
public class EmbeddedHttp2Target extends EmbeddedHttpTarget { | ||
private static EmbeddedHttp2Target instance; | ||
|
||
EmbeddedHttp2Target(Map<String, Object> cfg) { | ||
super(cfg); | ||
} | ||
|
||
public static void fuzzerInitialize() { | ||
instance = new EmbeddedHttp2Target(Map.of( | ||
"micronaut.server.http-version", "2.0" | ||
)); | ||
} | ||
|
||
public static void fuzzerTestOneInput(byte[] input) { | ||
instance.run(input); | ||
} | ||
|
||
public static void fuzzerTearDown() { | ||
instance.close(); | ||
} | ||
|
||
public static void main(String[] args) { | ||
LocalJazzerRunner.create(EmbeddedHttp2Target.class).fuzz(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters