oss-fuzz/projects/guava/HostAndPortFuzzer.java

18 lines
609 B
Java
Raw Normal View History

2022-09-18 00:51:14 +00:00
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");
}
}
}