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

BJData dimension length can not be string_t::npos, fix #3541 #3543

Merged
merged 5 commits into from
Jun 18, 2022

Conversation

fangq
Copy link
Contributor

@fangq fangq commented Jun 17, 2022

this patch should fix the assertion error in #3541. The string_t::npos (-1) is used as a flag and can not be a valid dimension length.

as test case has been added - will find out if it works on 32 bit builds.

@fangq fangq requested a review from nlohmann as a code owner June 17, 2022 15:13
@coveralls
Copy link

coveralls commented Jun 17, 2022

Coverage Status

Coverage remained the same at 100.0% when pulling b4623cb on NeuroJSON:issue3541 into f6acdbe on nlohmann:develop.

@nlohmann nlohmann linked an issue Jun 17, 2022 that may be closed by this pull request
2 tasks
@nlohmann nlohmann added the aspect: binary formats BSON, CBOR, MessagePack, UBJSON label Jun 17, 2022
@falbrechtskirchinger
Copy link
Contributor

@nlohmann Please don't merge just yet.

@falbrechtskirchinger
Copy link
Contributor

falbrechtskirchinger commented Jun 18, 2022

@fangq I've added the new tests to the 32bit unit test. Please apply the top commit from my branch: https://github.com/falbrechtskirchinger/json/tree/issue3541

Edit: I'm creating a PR. GitHub support has explained to me, that when comparing across forks, the number of forks listed is capped at 200. Constructing the URL for comparing manually does work, though, e.g.:
https://github.com/NeuroJSON/json/compare/issue3541...falbrechtskirchinger:issue3541

NeuroJSON#1

@fangq
Copy link
Contributor Author

fangq commented Jun 18, 2022

@fangq I've added the new tests to the 32bit unit test. Please apply the top commit from my branch: https://github.com/falbrechtskirchinger/json/tree/issue3541

done

Copy link
Contributor

@falbrechtskirchinger falbrechtskirchinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann
Copy link
Owner

Didn’t we want to get rid of npos?

@falbrechtskirchinger
Copy link
Contributor

Didn’t we want to get rid of npos?

I was going to do that as part of my BJData-related PR.

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann nlohmann self-assigned this Jun 18, 2022
@nlohmann nlohmann added this to the Release 3.11.0 milestone Jun 18, 2022
@nlohmann nlohmann merged commit 1373023 into nlohmann:develop Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

json:parse_bjdata_fuzzer: ASSERT: ref_stack.back()->is_array()
4 participants