config: fixed buffer not null terminated bug.
This fixes coverity CID 47570.
This commit is contained in:
parent
229a9e2a68
commit
7571783f4a
|
@ -46,7 +46,7 @@ config_edj_path_update(config_data *cd)
|
|||
if (ext && file)
|
||||
snprintf(buf, (ext - file) + 1, "%s", file);
|
||||
else
|
||||
strncpy(buf, file, sizeof(buf));
|
||||
strncpy(buf, file, sizeof(buf) - 1);
|
||||
char *filedir = ecore_file_dir_get(cd->edc_path);
|
||||
sprintf(edj_path, "%s/%s.edj", filedir, buf);
|
||||
free(filedir);
|
||||
|
|
Loading…
Reference in New Issue