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

ConnectionMaster / json / 35777562472
98%

Build:
DEFAULT BRANCH: develop
Ran 22 Sep 2026 11:01PM 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: 96.156% (-0.08%) from 96.237%
35777562472

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%)

Branch coverage included in aggregate %.

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
95.78
-0.75% include/nlohmann/json.hpp
3
96.16
0.73% include/nlohmann/detail/input/json_sax.hpp
1
96.08
0.07% include/nlohmann/detail/output/binary_writer.hpp
Jobs
ID Job ID Ran Files Coverage
1 35777562472.1 22 Sep 2026 11:01PM UTC 33
96.16
GitHub Action Run
Source Files on build 35777562472
  • Tree
  • List 33
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35777562472
  • 0b20b7e6 on github
  • Prev Build on develop (#35046368205)
  • Next Build on develop (#35834804407)
  • Delete
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