about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libutil/util.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 879f9fb5fddd..0d903f2f0d43 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -196,8 +196,8 @@ Path readLink(const Path & path)
     ssize_t rlsize = readlink(path.c_str(), buf, st.st_size);
     if (rlsize == -1)
         throw SysError(format("reading symbolic link ‘%1%’") % path);
-    else if (rlsize != st.st_size)
-        throw Error(format("symbolic link ‘%1%’ size mismatch %2% != %3%")
+    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);
 }