efreet: Always '\0' terminate buf
authorSebastian Dransfeld <sebastian.dransfeld@sintef.no>
Mon, 14 Oct 2013 09:54:51 +0000 (11:54 +0200)
committerSebastian Dransfeld <sebastian.dransfeld@sintef.no>
Mon, 14 Oct 2013 09:54:51 +0000 (11:54 +0200)
CID 1039721

src/lib/efreet/efreet_trash.c

index 1301b83..e759247 100644 (file)
@@ -111,6 +111,7 @@ efreet_trash_dir_get(const char *file)
                 if (s_src.st_dev == s_dest.st_dev)
                 {
                     strncpy(buf, dir, PATH_MAX);
+                    buf[PATH_MAX - 1] = 0;
                     continue;
                 }
                 else