mirror of https://github.com/google/oss-fuzz.git
rdf4j: Fix exception handling for ParserFuzzer (#10796)
In https://github.com/eclipse/rdf4j/blob/main/core/queryparser/sparql/src/main/java/org/eclipse/rdf4j/query/parser/sparql/BaseDeclProcessor.java#L73, the method throws an IllegalArgumentException when the input does not fulfil some of the conditions which could happen when we fuzz the project. This PR fixes the fuzzer by capturing the exception. Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
This commit is contained in:
parent
ae5ed8e758
commit
081abd306e
|
@ -28,7 +28,7 @@ public class ParserFuzzer {
|
|||
SPARQLParser obj = new SPARQLParser();
|
||||
obj.parseQuery(
|
||||
data.consumeString(data.remainingBytes() / 2), data.consumeRemainingAsString());
|
||||
} catch (MalformedQueryException e1) {
|
||||
} catch (MalformedQueryException | IllegalArgumentException e1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue