summaryrefslogtreecommitdiffstats
path: root/dotlock.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2007-01-26 14:34:11 +0000
committerThomas Roessler <roessler@does-not-exist.org>2007-01-26 14:34:11 +0000
commitaeb0b01d8f70c9b70db34ec624195f8adf0c41a3 (patch)
treef5ac727c3d3ed57909102ab1468dfc80db16eb2a /dotlock.c
parent965a96124f8d67eeabb1975a795ffff78729d4e1 (diff)
Fix #2710, of-by-one in dotlock.c.
Diffstat (limited to 'dotlock.c')
-rw-r--r--dotlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dotlock.c b/dotlock.c
index 23094b81..90d1f5e6 100644
--- a/dotlock.c
+++ b/dotlock.c
@@ -554,7 +554,7 @@ dotlock_deference_symlink (char *d, size_t l, const char *path)
char linkpath[_POSIX_PATH_MAX];
int len;
- if ((len = readlink (pathptr, linkfile, sizeof (linkfile))) == -1)
+ if ((len = readlink (pathptr, linkfile, sizeof (linkfile) - 1)) == -1)
{
/* perror (pathptr); */
return -1;