Fix: sessiond: g++ reports shm_path truncation issue
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 8 Jul 2024 15:50:01 +0000 (11:50 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 30 Jul 2024 01:26:50 +0000 (01:26 +0000)
commit2be770a56fa34dde299798f73c9a7b081a3bc808
tree7c055d9b5167a8393fa391114281f7dfd8fb3d97
parent2f566a887f7803f546abe1e44456ae8314ffec08
Fix: sessiond: g++ reports shm_path truncation issue

On the CI, g++ reports:
  char* strncpy(char*, const char*, size_t)' specified bound 4096 equals destination size [-Wstringop-truncation]

The shm_path provided by liblttng-ctl is truncated to PATH_MAX
regardless of its contents.

LTTN_ERR_INVALID is returned if the shm_path is not null terminated.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ie369f2ee368c70e2b3b41c45a69da7e6d9fa45f8
src/bin/lttng-sessiond/cmd.cpp
This page took 0.025024 seconds and 4 git commands to generate.