No Space For Null Terminator
strncpy() may not null-terminate
(char *)buffer.
- strncpy() may write a non-null value into the very last byte of the string.
- The string's capacity is 14.
- The last character written by strncpy() could be character sizeof( buffer ) - 1, which evaluates to 13.
- If a subsequent statement definitely null-terminates the string, you can safely ignore this warning.
The issue can occur if the highlighted code executes.
See related events 1 and 2.
Show: All events | Only primary events