Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

Tencent/rapidjson
master @ 24b5e7a
6
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Memory Corruption: 4 prior fixes. Scrutinize any change in this area.
include/rapidjson/document.h: most-fixed (1 issue). Treat as high-risk during review.
4 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Memory Corruption: Incorrect template resolution bypassed the mandatory memory reservation step, allowing unsafe writes via `PutUnsafe` to overflow target buffers. Future stream modifications must ensure memory guarantees are correctly inherited during template specialization.
Memory Safety: Reallocation of the operand stack during regex compilation invalidated active pointers, leading to a use-after-free scenario. This highlights the risk of unchecked stack reallocations when pushing elements to dynamic internal arrays.
Memory Corruption: Implicitly generated assignment operators on `GenericDocument` allowed shallow resource copying, resulting in double-free or invalid memory states when the objects went out of scope. Prohibiting copy assignments on resource-owning classes is critical to maintaining memory safety.