1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

mountpoint-util: replace our last use of FILENAME_MAX by PATH_MAX

This commit is contained in:
Lennart Poettering 2021-03-08 22:44:35 +01:00
parent db22003233
commit 445714569d

View File

@ -148,7 +148,7 @@ static bool filename_possibly_with_slash_suffix(const char *s) {
if (!slash)
return filename_is_valid(s);
if (slash - s > FILENAME_MAX) /* We want to allocate on the stack below, hence do a size check first */
if (slash - s > PATH_MAX) /* We want to allocate on the stack below, hence do a size check first */
return false;
if (slash[strspn(slash, "/")] != 0) /* Check that the suffix consist only of one or more slashes */