Vulnerable Functions Cheat-Sheet
- Always pass a size derived from the destination, and reserve room for the NUL byte.
strncpydoes not guarantee termination — NUL-terminate manually.
Key Takeaway
Bound every copy by the destination size; treat any input length as hostile.