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
parent 2139ecc40a
commit b39ab53ffc
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,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);