aboutsummaryrefslogtreecommitdiff
path: root/test_utils/test_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'test_utils/test_main.c')
-rw-r--r--test_utils/test_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test_utils/test_main.c b/test_utils/test_main.c
index 1b9af9a9c37b..1b44edf171d9 100644
--- a/test_utils/test_main.c
+++ b/test_utils/test_main.c
@@ -1863,7 +1863,7 @@ is_symlink(const char *file, int line,
return (0);
if (contents == NULL)
return (1);
- linklen = readlink(pathname, buff, sizeof(buff));
+ linklen = readlink(pathname, buff, sizeof(buff) - 1);
if (linklen < 0) {
failure_start(file, line, "Can't read symlink %s", pathname);
failure_finish(NULL);