aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libutil/util.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 3becbbabc..25246a3e8 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -209,7 +209,7 @@ Path readLink(const Path & path)
else if (rlsize > st.st_size)
throw Error(format("symbolic link ‘%1%’ size overflow %2% > %3%")
% path % rlsize % st.st_size);
- return string(buf, st.st_size);
+ return string(buf, rlsize);
}