mirror of
https://github.com/systemd/systemd.git
synced 2026-08-09 17:38:42 +00:00
env-util: use our own sc_arg_max() helper at more places
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user