forked from enlightenment/efl
elm_prefs.c: make the string null terminated.
This fixes coverity CID 1046593 : Buffer not null terminated (BUFFER_SIZE_WARNING).
This commit is contained in:
parent
4f8206d650
commit
298af57c54
|
@ -333,7 +333,8 @@ _elm_prefs_item_node_by_name(Elm_Prefs_Smart_Data *sd,
|
|||
char *token;
|
||||
char *aux = buf;
|
||||
|
||||
strncpy(buf, name, PATH_MAX);
|
||||
strncpy(buf, name, PATH_MAX - 1);
|
||||
buf[PATH_MAX - 1] = '\0';
|
||||
|
||||
token = strsep(&aux, ":");
|
||||
|
||||
|
|
Loading…
Reference in New Issue