summaryrefslogtreecommitdiff
path: root/src/bin/efreet
diff options
context:
space:
mode:
authorSebastian Dransfeld <sebastian.dransfeld@sintef.no>2013-10-14 13:07:43 +0200
committerSebastian Dransfeld <sebastian.dransfeld@sintef.no>2013-10-14 13:14:59 +0200
commitcc89eb2af953aaadf2c5f2f252169497916e272a (patch)
tree37e69384bf3f5ee77fc0ccedcebe38e999ac3779 /src/bin/efreet
parent6b18d7b80a45443e5d237bec0af1560e341e23f6 (diff)
efreet: Check size of buffer and '\0' terminate
CID 1039595
Diffstat (limited to 'src/bin/efreet')
-rw-r--r--src/bin/efreet/efreet_desktop_cache_create.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/efreet/efreet_desktop_cache_create.c b/src/bin/efreet/efreet_desktop_cache_create.c
index 4a25575de8..577091ffc9 100644
--- a/src/bin/efreet/efreet_desktop_cache_create.c
+++ b/src/bin/efreet/efreet_desktop_cache_create.c
@@ -152,7 +152,10 @@ cache_scan(const char *path, const char *base_id, int priority, int recurse, int
152 if (*base_id) 152 if (*base_id)
153 snprintf(id, sizeof(id), "%s-%s", base_id, fname); 153 snprintf(id, sizeof(id), "%s-%s", base_id, fname);
154 else 154 else
155 strcpy(id, fname); 155 {
156 strncpy(id, fname, PATH_MAX);
157 id[PATH_MAX - 1] = '\0';
158 }
156 file_id = id; 159 file_id = id;
157 } 160 }
158 161