Fix: Possible buffer overflows in strncat() usage
authorChristian Babeux <christian.babeux@efficios.com>
Mon, 20 Aug 2012 19:56:06 +0000 (15:56 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 20 Aug 2012 20:11:21 +0000 (16:11 -0400)
commitc30ce0b3d524a2c15bc688356d50d38fa9b43f85
tree5698d043cb353bc63b99c011be9f34496d846f77
parent2f77fc4b3720dc8f75847130498c2d4aad7c03ec
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 <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/cmd.c
src/bin/lttng-sessiond/consumer.c
src/bin/lttng-sessiond/main.c
src/common/utils.c
This page took 0.03384 seconds and 4 git commands to generate.