Skip to content

removing the fix for invalid input in FuzzCSVReadTest fixes the broken support for valid input in #497 #545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pjfanning opened this issue Feb 28, 2025 · 2 comments

Comments

@pjfanning
Copy link
Member

if (!canModifyBuffer()) {
// 15-Aug-2022, tatu: Occurs (only) if we have half-decoded UTF-8
// characters; uncovered by:
//
// https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50036
//
// and need to be reported as IOException
if (_inputSource == null) {
throw new IOException(String.format(
"End-of-input after first %d byte(s) of a UTF-8 character: needed at least one more",
available));
}
}

invalid input that we might accidentally treat as valid if we remove the code
https://github.com/FasterXML/jackson-dataformats-text/blob/d43289df0be12aa0d8ee9cea97405cca337049bf/csv/src/test/java/com/fasterxml/jackson/dataformat/csv/deser/FuzzCSVReadTest.java

valid input that we will now properly support if we remove the code

Would it be possible to consider removing the code and trying later to come up with another fix for the fuzz case?
I think it is better to fix #497 and later come back to the fuzz case.

@pjfanning
Copy link
Member Author

@cowtowncoder #546 seems to indicate the removal of the code is fine - the fuzz case still behaves correctly, just the exception message changes a little

@cowtowncoder
Copy link
Member

Merged #546 with all the rework; I think we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants