diff options
Diffstat (limited to 'lib/libc/gen/basename.c')
-rw-r--r-- | lib/libc/gen/basename.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/basename.c b/lib/libc/gen/basename.c index b68ef3f..09998cf 100644 --- a/lib/libc/gen/basename.c +++ b/lib/libc/gen/basename.c @@ -66,7 +66,7 @@ basename(path) while (startp > path && *(startp - 1) != '/') startp--; - if (endp - startp + 1 > sizeof(bname)) { + if (endp - startp + 2 > sizeof(bname)) { errno = ENAMETOOLONG; return(NULL); } |