From 7887e1c897d1732f58bd0366d5a52dcca2226775 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Tue, 10 Dec 2024 05:10:02 +0100 Subject: [PATCH] lib/env.c: sanitize_env(): Use !strprefix() instead of its pattern Signed-off-by: Alejandro Colomar --- lib/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.47.2