Pattern: Unsafe use of strncat()
usage
Issue: -
At most, strncat()
appends the 3rd parameter’s amount of characters and adds a terminating null byte.
The safe way to use strncat()
is to subtract one from the remaining space in the buffer and use it as 3rd parameter.