]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Correct test for too small buffer.
authorUlrich Drepper <drepper@redhat.com>
Wed, 19 Nov 1997 23:45:39 +0000 (23:45 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 19 Nov 1997 23:45:39 +0000 (23:45 +0000)
sysdeps/posix/getcwd.c

index fa3cf98c743de365c45e56899d505a3ecd292601..865bd3fa6a11e8b92ee8d780beee7b7ec75aa5fe 100644 (file)
@@ -326,7 +326,7 @@ __getcwd (buf, size)
        {
          size_t namlen = _D_EXACT_NAMLEN (d);
 
-         if ((size_t) (pathp - path) < namlen)
+         if ((size_t) (pathp - path) <= namlen)
            {
              if (buf != NULL)
                {