]> granicus.if.org Git - neomutt/commitdiff
Fix #2710, of-by-one in dotlock.c.
authorThomas Roessler <roessler@does-not-exist.org>
Fri, 26 Jan 2007 14:34:11 +0000 (14:34 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Fri, 26 Jan 2007 14:34:11 +0000 (14:34 +0000)
dotlock.c

index 23094b8128d24019bfc24c457731c66ebbd4dee6..90d1f5e6b48480e1168f6d163bc77cedace50e50 100644 (file)
--- 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;