Fix possible harmful warning: the value of the size argument in 'strncat' is too large, change the argument to be the free space in the destination buffer minus the terminating null byte