diff options
-rw-r--r-- | src/port/dirmod.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/port/dirmod.c b/src/port/dirmod.c index 51c9bded8fb..398787360a2 100644 --- a/src/port/dirmod.c +++ b/src/port/dirmod.c @@ -359,6 +359,9 @@ pgreadlink(const char *path, char *buf, size_t size) return -1; } + /* r includes the null terminator */ + r -= 1; + /* * If the path starts with "\??\", which it will do in most (all?) cases, * strip those out. |