• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nlohmann / json / 35776605214
98%

Build:
DEFAULT BRANCH: develop
Ran 22 Sep 2026 10:47PM UTC
Jobs 1
Files 33
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Sep 2026 07:52PM UTC coverage: 97.847% (+0.03%) from 97.817%
35776605214

push

github

web-flow
Reject MessagePack/BSON binary subtypes that don't fit their wire format (#5469)

* Reject MessagePack/BSON binary subtypes that don't fit their wire format

Both formats store byte_container_with_subtype's subtype (a uint64_t)
in a single byte. The writers cast to std::int8_t/std::uint8_t without
a range check, so subtypes above 255 were silently truncated modulo
256 instead of raising an error. Throw out_of_range.413 instead when
the subtype exceeds the representable range of 0-255.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* Move the new binary-subtype regression test out of unit-regression2.cpp

unit-regression2.cpp is already at the edge of what the MinGW linker
can relocate; adding this test's ~26 lines tips test-regression2_cpp20
(clang, Windows) over into "relocation truncated to fit:
IMAGE_REL_AMD64_REL32 against `.rdata'" (see 8ce64b9c1 / b82717c8a for
the same failure mode). Split the test along format lines instead:
MessagePack assertions move to unit-msgpack.cpp, BSON assertions to
unit-bson.cpp. The CBOR round-trip guard is dropped as redundant --
unit-cbor.cpp's "Tagged values" section already round-trips subtypes
up to 8589934590, far past the 70000 checked here.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

---------

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

2679 of 2920 branches covered (91.75%)

4 of 4 new or added lines in 1 file covered. (100.0%)

30 existing lines in 3 files now uncovered.

7452 of 7616 relevant lines covered (97.85%)

16766446.31 hits per line

Coverage Regressions

Lines Coverage ∆ File
26
97.3
0.11% include/nlohmann/json.hpp
3
99.14
0.06% include/nlohmann/detail/input/json_sax.hpp
1
99.65
0.0% include/nlohmann/detail/output/binary_writer.hpp
Jobs
ID Job ID Ran Files Coverage
1 35776605214.1 22 Sep 2026 10:47PM UTC 33
97.85
GitHub Action Run
Source Files on build 35776605214
  • Tree
  • List 33
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35776605214
  • 0b20b7e6 on github
  • Prev Build on develop (#35009576755)
  • Next Build on develop (#35823938698)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc