diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file.c b/legacy/ecore/src/lib/ecore_file/ecore_file.c index 065f8bab19..58eb1d6355 100644 --- a/legacy/ecore/src/lib/ecore_file/ecore_file.c +++ b/legacy/ecore/src/lib/ecore_file/ecore_file.c @@ -658,7 +658,7 @@ ecore_file_readlink(const char *link) char buf[PATH_MAX]; int count; - if ((count = readlink(link, buf, sizeof(buf))) < 0) return NULL; + if ((count = readlink(link, buf, sizeof(buf) - 1)) < 0) return NULL; buf[count] = 0; return strdup(buf); }