config: fixed buffer not null terminated bug.

This fixes coverity CID 47570.
This commit is contained in:
Daniel Juyung Seo 2014-08-23 00:44:34 +09:00 committed by ChunEon Park
parent 229a9e2a68
commit 7571783f4a
1 changed files with 1 additions and 1 deletions

View File

@ -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);