From: Daniel Stenberg Date: Fri, 21 Feb 2025 11:28:19 +0000 (+0100) Subject: http: fix the auth check X-Git-Tag: curl-8_13_0~396 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93958499f250da599368de40bc2ba742832fb189;p=thirdparty%2Fcurl.git http: fix the auth check It used the wrong variable. Follow-up to d1fc1c4a854d5cc809cc4ae59a9511900228023a Pointed-out-by: qhill on github Ref: https://github.com/curl/curl/pull/16406#pullrequestreview-2632734134 Closes #16419 --- diff --git a/lib/http.c b/lib/http.c index 4bbe827a1d..86e2521184 100644 --- a/lib/http.c +++ b/lib/http.c @@ -880,7 +880,7 @@ static bool authcmp(const char *auth, const char *line) { /* the auth string must not have an alnum following */ size_t n = strlen(auth); - return strncasecompare(auth, line, n) && !ISALNUM(auth[n]); + return strncasecompare(auth, line, n) && !ISALNUM(line[n]); } #endif