Skip to content
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

Null parsing accepts bad input #357

Open
mtdowling opened this issue Jun 27, 2024 · 5 comments
Open

Null parsing accepts bad input #357

mtdowling opened this issue Jun 27, 2024 · 5 comments

Comments

@mtdowling
Copy link

Various places in this library that parse null will see 'n' and then skip the next three characters without validating that the next three characters are 'u' 'l' 'l'. So this is parsed as null: nope.

See for example https://github.com/json-iterator/java/blob/master/src/main/java/com/jsoniter/IterImplObject.java#L10-L12

    public static final String readObject(JsonIterator iter) throws IOException {
        byte c = IterImpl.nextToken(iter);
        switch (c) {
            case 'n':
                IterImpl.skipFixedBytes(iter, 3);
                return null;
@TDila
Copy link

TDila commented Aug 12, 2024

Hello, I'm new to open-source contribution and I would like to help. Are you working on this? if not, can you please assign this to me?

@mtdowling
Copy link
Author

I’m not working on this, please feel free.

@TDila
Copy link

TDila commented Aug 13, 2024

@mtdowling thanks 👍

@bodasiddartha
Copy link

@mtdowling I'm new to open source and I would love to give it a try(even if it does not help).

@ChristoJobyAntony
Copy link

Hey, we are a team of 5 university students working on contributing to OSS projects. We would love to work on this issue if it is still unassigned. Thank you for your time.

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

4 participants