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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Showing
Please
register
or
sign in
to comment