Menu

#4 configuration.c: 2* missing terminator

v1.0 (example)
open
nobody
None
5
2014-04-25
2014-04-25
dcb
No

1.

[configuration.c:168]: (error) Dangerous usage of 'line' (strncpy doesn't always null-terminate it).

ifdef WIN32

strncpy(line,".\",1023); / FIXME: hack /

else

strncpy(line,getenv("HOME"),1023);

endif

strncat(line,CONFIG_FILE,(1023-strlen(line)));

Maybe something like

ifdef WIN32

strncpy(line,".\",1023); / FIXME: hack /

else

strncpy(line,getenv("HOME"),1023);

endif

line[1023] = '\0';
strncat(line,CONFIG_FILE,(1023-strlen(line)));

2.

[configuration.c:328]: (error) Dangerous usage of 'file' (strncpy doesn't always null-terminate it).

Duplicate.

Discussion


Log in to post a comment.