From: Thomas Roessler Date: Fri, 26 Jan 2007 14:34:11 +0000 (+0000) Subject: Fix #2710, of-by-one in dotlock.c. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3f00adb7fb2a7520420e120a80c4c36e94466c2;p=neomutt Fix #2710, of-by-one in dotlock.c. --- 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;