aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-12-29 12:54:07 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-05 23:31:20 +0100
commit2a4af0c74c7a167477d57dd1d065782516313c9b (patch)
treea46015636d30c7430baba8ff09a8ae9813a77a1f /nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
parentce43e4346fd8c4262f14b8abcddad209e021fbf1 (diff)
downloadnx-libs-2a4af0c74c7a167477d57dd1d065782516313c9b.tar.gz
nx-libs-2a4af0c74c7a167477d57dd1d065782516313c9b.tar.bz2
nx-libs-2a4af0c74c7a167477d57dd1d065782516313c9b.zip
Error.c: fix format-truncation warning
Error.c: In function ‘nxagentGetSessionPath’: Error.c:543:62: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 253 [-Wformat-truncation=] snprintf(nxagentSessionDir, DEFAULT_STRING_LENGTH, "%s/C-%s", rootPath, nxagentSessionId); ^~ ~~~~~~~~~~~~~~~~ Error.c:543:5: note: ‘snprintf’ output 4 or more bytes (assuming 259) into a destination of size 256 snprintf(nxagentSessionDir, DEFAULT_STRING_LENGTH, "%s/C-%s", rootPath, nxagentSessionId); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keyboard.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index c145e4dba..695fce40d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -1449,13 +1449,8 @@ static char* getKeyboardFilePath(void)
{
if ((asprintf(&keyboard_file_path, "%s/keyboard", sessionpath) == -1))
{
- SAFE_free(sessionpath);
FatalError("malloc for keyboard file path failed.");
}
- else
- {
- SAFE_free(sessionpath);
- }
}
else
{