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>
Wed, 25 Sep 2019 16:34:57 +0000 (12:34 -0400)
commit1a3acabaf8cb053236e1a3fd993fcf5e1d70e777
treef5232104b41d596478510de6a1384d153fd19afe
parent5b9d726b0ae2082905e7c56ab662e0717689d1ce
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.024886 seconds and 4 git commands to generate.