From: Christian Babeux Date: Mon, 20 Aug 2012 19:56:06 +0000 (-0400) Subject: Fix: Possible buffer overflows in strncat() usage X-Git-Tag: v2.1.0-rc2~10 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=c30ce0b3d524a2c15bc688356d50d38fa9b43f85;hp=c30ce0b3d524a2c15bc688356d50d38fa9b43f85 Fix: Possible buffer overflows in strncat() usage When using strncat, the size_t n argument must indicate the left over space remaining in the buffer, *not* the total buffer size. Also, proper care must be taken for the case where src contains n or more bytes and thus allow space for the null terminating byte appended to dest (e.g. strncat() will write n+1 bytes). Signed-off-by: Christian Babeux Signed-off-by: David Goulet ---