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

fix eof for get_binary and get_string #2294

Merged
merged 4 commits into from
Jul 20, 2020
Merged

Conversation

jprochazk
Copy link
Contributor

Fixes #2293 by breaking when encountering an EOF in binary_reader::get_string() and binary_reader::get_binary()


Pull request checklist

  • Changes are described in the pull request, or an existing issue is referenced.
  • The test suite compiles and runs without error.
  • Code coverage is 100%. Test cases can be added by editing the test suite.
  • The source code is amalgamated; that is, after making changes to the sources in the include/nlohmann directory, run make amalgamate to create the single-header file single_include/nlohmann/json.hpp. The whole process is described here.

@jprochazk jprochazk requested a review from nlohmann as a code owner July 19, 2020 09:09
@coveralls
Copy link

coveralls commented Jul 19, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling 851315c on jprochazk:develop into 43ab8a2 on nlohmann:develop.

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.

Can you please add the example from #2293 (comment) as regression test?

@jprochazk jprochazk requested a review from nlohmann July 19, 2020 16:37
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 added this to the Release 3.8.1 milestone Jul 20, 2020
@nlohmann nlohmann merged commit 893eda8 into nlohmann:develop Jul 20, 2020
@nlohmann
Copy link
Owner

Thanks a lot!

@nlohmann
Copy link
Owner


🔖 Release item

This issue/PR will be part of the next release of the library. This template helps preparing the release notes.

Type

  • ✨ New Feature
  • 🐛 Bug Fix
  • ⚡️ Improvement
  • 🔨 Further Change
  • 🔥 Deprecated function

Description


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.

Application stalls indefinitely with message byte size 10
3 participants