mirror of https://github.com/google/oss-fuzz.git
add Rhino primary contact (#9371)
This commit is contained in:
parent
b37a2d948d
commit
6211c9d86e
|
@ -32,9 +32,7 @@ public class HtmlParserFuzzer {
|
||||||
private FuzzedDataProvider fuzzedDataProvider;
|
private FuzzedDataProvider fuzzedDataProvider;
|
||||||
|
|
||||||
public HtmlParserFuzzer(FuzzedDataProvider fuzzedDataProvider) {
|
public HtmlParserFuzzer(FuzzedDataProvider fuzzedDataProvider) {
|
||||||
|
|
||||||
this.fuzzedDataProvider = fuzzedDataProvider;
|
this.fuzzedDataProvider = fuzzedDataProvider;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserVersion getBrowserVersion() {
|
BrowserVersion getBrowserVersion() {
|
||||||
|
@ -42,33 +40,26 @@ public class HtmlParserFuzzer {
|
||||||
* from src/test/java/com/gargoylesoftware/htmlunit/WebTestCase.java
|
* from src/test/java/com/gargoylesoftware/htmlunit/WebTestCase.java
|
||||||
*/
|
*/
|
||||||
return new BrowserVersion.BrowserVersionBuilder(BrowserVersion.BEST_SUPPORTED)
|
return new BrowserVersion.BrowserVersionBuilder(BrowserVersion.BEST_SUPPORTED)
|
||||||
.setApplicationName("FLAG_ALL_BROWSERS")
|
.setApplicationName("FLAG_ALL_BROWSERS")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
void test() {
|
void test() {
|
||||||
try {
|
try (WebClient webClient = new WebClient(getBrowserVersion())) {
|
||||||
WebClient webClient = new WebClient(getBrowserVersion());
|
|
||||||
WebResponse webResponse = new StringWebResponse(fuzzedDataProvider.consumeRemainingAsString(), new URL("http://localhost.edu/index.html"));
|
|
||||||
HtmlPage page = new HtmlPage(webResponse, webClient.getCurrentWindow());
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* net.sourceforge.htmlunit.corejs.javascript.EvaluatorException
|
* net.sourceforge.htmlunit.corejs.javascript.EvaluatorException
|
||||||
* seems to be fatal
|
* seems to be fatal
|
||||||
*/
|
*/
|
||||||
webClient.getOptions().setThrowExceptionOnScriptError(false);
|
webClient.getOptions().setThrowExceptionOnScriptError(false);
|
||||||
|
|
||||||
webClient.getCurrentWindow().setEnclosedPage(page);
|
webClient.loadHtmlCodeIntoCurrentWindow(fuzzedDataProvider.consumeRemainingAsString());
|
||||||
webClient.getPageCreator().getHtmlParser().parse(webResponse, page, false, false);
|
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
} catch (MalformedURLException e) {
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void fuzzerTestOneInput(FuzzedDataProvider fuzzedDataProvider) {
|
public static void fuzzerTestOneInput(FuzzedDataProvider fuzzedDataProvider) {
|
||||||
|
|
||||||
HtmlParserFuzzer testFixture = new HtmlParserFuzzer(fuzzedDataProvider);
|
HtmlParserFuzzer testFixture = new HtmlParserFuzzer(fuzzedDataProvider);
|
||||||
testFixture.test();
|
testFixture.test();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
homepage: "https://github.com/mozilla/rhino"
|
homepage: "https://github.com/mozilla/rhino"
|
||||||
language: jvm
|
language: jvm
|
||||||
main_repo: "https://github.com/mozilla/rhino.git"
|
main_repo: "https://github.com/mozilla/rhino.git"
|
||||||
|
primary_contact: "ronaldbrill@googlemail.com"
|
||||||
fuzzing_engines:
|
fuzzing_engines:
|
||||||
- libfuzzer
|
- libfuzzer
|
||||||
sanitizers:
|
sanitizers:
|
||||||
|
|
Loading…
Reference in New Issue