summaryrefslogtreecommitdiffstats
path: root/sys-utils/mountpoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/mountpoint.c')
-rw-r--r--sys-utils/mountpoint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/mountpoint.c b/sys-utils/mountpoint.c
index a43bfd6dd..ad9c1da2e 100644
--- a/sys-utils/mountpoint.c
+++ b/sys-utils/mountpoint.c
@@ -71,7 +71,7 @@ static int dir_to_device(struct mountpoint_control *ctl)
len = snprintf(buf, sizeof(buf), "%s/..", cn ? cn : ctl->path);
free(cn);
- if (len < 0 || (size_t) len + 1 > sizeof(buf))
+ if (len < 0 || (size_t) len >= sizeof(buf))
return -1;
if (stat(buf, &pst) !=0)
return -1;