AntiPattern
Unsafe Length Arithmetic
unsafe-length-arithmetic
Size- and string-length calculations are trusted too far in low-level C glue code—allocation sizes drift from actual writes, fast/slow paths diverge, and attacker-controlled metadata overflows counters—leading to buffer overflows or massive allocations.