From: Lennart Poettering Date: Wed, 1 Jul 2026 09:03:19 +0000 (+0200) Subject: env-util: use our own sc_arg_max() helper at more places X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d769892ad08451267e615efa6b67f86a9e267236;p=thirdparty%2Fsystemd.git env-util: use our own sc_arg_max() helper at more places --- diff --git a/src/basic/env-util.c b/src/basic/env-util.c index 934428e7f52..4f677565e93 100644 --- a/src/basic/env-util.c +++ b/src/basic/env-util.c @@ -555,7 +555,7 @@ char* strv_env_get_n(char * const *l, const char *name, size_t k, ReplaceEnvFlag const char *t; /* Safety check that the name is not overly long, before we do a stack allocation */ - if (k > (size_t) sysconf(_SC_ARG_MAX) - 2) + if (k > sc_arg_max() - 2) return NULL; t = strndupa_safe(name, k);