From: Alejandro Colomar Date: Tue, 10 Dec 2024 04:10:02 +0000 (+0100) Subject: lib/env.c: sanitize_env(): Use !strprefix() instead of its pattern X-Git-Tag: 4.18.0-rc1~77 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7887e1c897d1732f58bd0366d5a52dcca2226775;p=thirdparty%2Fshadow.git lib/env.c: sanitize_env(): Use !strprefix() instead of its pattern Signed-off-by: Alejandro Colomar --- diff --git a/lib/env.c b/lib/env.c index df1a2c08a..9a21a368e 100644 --- a/lib/env.c +++ b/lib/env.c @@ -223,7 +223,7 @@ void sanitize_env (void) for (cur = envp; NULL != *cur; cur++) { for (bad = noslash; NULL != *bad; bad++) { - if (strncmp (*cur, *bad, strlen (*bad)) != 0) { + if (!strprefix(*cur, *bad)) { continue; } if (strchr (*cur, '/') == NULL) {