aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/ecore/src/lib/ecore_file/ecore_file.c
diff options
context:
space:
mode:
authorBrett Nash <nash@nash.id.au>2010-07-05 04:11:53 +0000
committerBrett Nash <nash@nash.id.au>2010-07-05 04:11:53 +0000
commit1c185410b4c9e7571bca05f73e7545823f932f35 (patch)
tree095d33dde72d1e933241a1017e5cb2580f8657b9 /legacy/ecore/src/lib/ecore_file/ecore_file.c
parentRe-convert to old format on Edje_Edit when saving (diff)
downloadefl-1c185410b4c9e7571bca05f73e7545823f932f35.tar.gz
Old bug: Don't suffer from buffer overflow in readlink.
SVN revision: 50040
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file.c2
1 files changed, 1 insertions, 1 deletions
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);
}