summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-10-19 08:18:23 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-10-19 08:18:23 +0000
commit26283cd9e6e778a00d1e2acba716771f4416c188 (patch)
treea9a20a2cdf92488902f918363cdd94c13e459331 /src
parent5356c27eb2103ee03fcd036afb21a63e063842ba (diff)
downloads6-rc-26283cd9e6e778a00d1e2acba716771f4416c188.tar.xz
Change safety guard to PATH_MAX because Solaris doesn't know NAME_MAX
Diffstat (limited to 'src')
-rw-r--r--src/libs6rc/s6rc_livedir_prefixsize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs6rc/s6rc_livedir_prefixsize.c b/src/libs6rc/s6rc_livedir_prefixsize.c
index 38d060a..d897fe6 100644
--- a/src/libs6rc/s6rc_livedir_prefixsize.c
+++ b/src/libs6rc/s6rc_livedir_prefixsize.c
@@ -20,7 +20,7 @@ int s6rc_livedir_prefixsize (char const *live, size_t *n)
return 1 ;
}
if (!S_ISREG(st.st_mode)) return (errno = EINVAL, 0) ;
- if (st.st_size > NAME_MAX) return (errno = ENAMETOOLONG, 0) ;
+ if (st.st_size > PATH_MAX) return (errno = ENAMETOOLONG, 0) ;
*n = st.st_size ;
return 1 ;
}