• Ulrich Sibiller's avatar
    Error.c: fix format-truncation warning · 2a4af0c7
    Ulrich Sibiller authored
    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);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2a4af0c7
Keyboard.c 43.6 KB