jackson-datatypes-collections: Catch known exceptions (#11310)

This PR catches some known exceptions which are missed before. This PR
solves https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64612,
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64614,
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64640 and
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64642.

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
This commit is contained in:
Arthur Chan 2023-12-04 18:50:27 +00:00 committed by GitHub
parent 76f3c27b87
commit 22c941296e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ public class EclipseCollectionsDeserializerFuzzer {
String value = data.consumeRemainingAsString();
mapper.readValue(value, type);
mapper.readTree(value);
} catch (IOException e) {
} catch (IOException | IllegalArgumentException e) {
// Known exception
}
}

View File

@ -65,7 +65,7 @@ public class GuavaDeserializerFuzzer {
TypeReference type = data.pickValue(choice);
String value = data.consumeRemainingAsString();
mapper.readValue(value, type);
} catch (IOException e) {
} catch (IOException | IllegalArgumentException e) {
// Known exception
}
}