Files
json/single_include/nlohmann
Niels Lohmann d05ac29f9b Make parse_cbor_internal's top a copy so it survives pop_back()
top aliased container_stack.back(), and was still read (top.is_object)
right after container_stack.pop_back() destroyed the element it aliased.
Nothing currently reorders those two lines, but the comment claiming the
reference's lifetime was already fine only accounted for reallocation
from a push, not this. A trivially-copyable container_frame makes top a
copy instead, so reads of it stay valid regardless of what happens to the
stack; the one place that mutates the live entry now does so through
container_stack.back() directly rather than through top.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-09-10 18:40:07 +02:00
..
2026-01-01 20:00:39 +01:00