mirror of https://github.com/google/oss-fuzz.git
18 lines
609 B
Java
18 lines
609 B
Java
|
import com.code_intelligence.jazzer.api.FuzzedDataProvider;
|
||
|
import com.code_intelligence.jazzer.api.FuzzerSecurityIssueLow;
|
||
|
import com.google.common.net.HostAndPort;
|
||
|
import java.lang.IllegalArgumentException;
|
||
|
|
||
|
public class HostAndPortFuzzer {
|
||
|
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
|
||
|
try {
|
||
|
HostAndPort hap = HostAndPort.fromString(data.consumeRemainingAsString());
|
||
|
} catch (IllegalArgumentException e) {
|
||
|
/* documented to be thrown, ignore */
|
||
|
} catch (Exception e) {
|
||
|
e.printStackTrace(System.out);
|
||
|
throw new FuzzerSecurityIssueLow("Undocumented Exception");
|
||
|
}
|
||
|
}
|
||
|
}
|