From d3f00adb7fb2a7520420e120a80c4c36e94466c2 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Fri, 26 Jan 2007 14:34:11 +0000 Subject: [PATCH] Fix #2710, of-by-one in dotlock.c. --- dotlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotlock.c b/dotlock.c index 23094b812..90d1f5e6b 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; -- 2.50.1