Pattern
Miscalculated Buffer Sizes
buffer-size-miscalculation
Buffer-writing code trusts derived length values (from syscall return, strlen-based estimates, or substring formulas) without fully bounding against allocated capacity, so strcpy/concat-style writes overflow or underflow and can cause crashes or memory corruption.