relayd: clean-up: mix-up between LTTNG_PATH_MAX and LTTNG_NAME_MAX
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 23 Sep 2019 18:46:42 +0000 (14:46 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 23 Sep 2019 18:48:44 +0000 (14:48 -0400)
commitda4f23eeb6dd852ec59bcc679312669876616281
tree73f0c64edfa01ae30a91eae75374811e7d221068
parent1ac9cb73f4885c3263036d96dbd0f236ba890a4b
relayd: clean-up: mix-up between LTTNG_PATH_MAX and LTTNG_NAME_MAX

LTTNG_PATH_MAX and LTTNG_NAME_MAX are mixed up in
cmd_create_session_2_4(). While Coverity warns of a possible buffer
overrun, this is not possible since the length of the received
buffer is correctly checked against LTTNG_NAME_MAX.

Change the use of LTTNG_PATH_MAX for LTTNG_NAME_MAX even though
strcpy() could be used safely here.

1405634 Out-of-bounds access
Access of memory not owned by this buffer may cause crashes or incorrect computations.
In relay_create_session: Out-of-bounds access to a buffer (CWE-119)

Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/cmd-2-4.c
This page took 0.02557 seconds and 4 git commands to generate.