summaryrefslogtreecommitdiff
path: root/udev/udev-node.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev/udev-node.c')
-rw-r--r--udev/udev-node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udev/udev-node.c b/udev/udev-node.c
index 2a2c2cf0b4..ceb1d52ea7 100644
--- a/udev/udev-node.c
+++ b/udev/udev-node.c
@@ -163,7 +163,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink)
int len;
dbg(udev, "found existing symlink '%s'\n", slink);
- len = readlink(slink, buf, sizeof(buf));
+ len = readlink(slink, buf, sizeof(buf) - 1);
if (len > 0) {
buf[len] = '\0';
if (strcmp(target, buf) == 0) {