From 0bc5b58ee3bf103ba78b6ccacbc58395e3825f8a Mon Sep 17 00:00:00 2001 From: DerKleinePunk Date: Thu, 2 Dec 2021 09:18:23 +0000 Subject: [PATCH] http: cookie_get The loop check shouldn't care about bl any more, since we snipped bl from n already. --- lib/roles/http/parsers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/roles/http/parsers.c b/lib/roles/http/parsers.c index 446bc986a..220f9cf82 100644 --- a/lib/roles/http/parsers.c +++ b/lib/roles/http/parsers.c @@ -1592,7 +1592,7 @@ lws_http_cookie_get(struct lws *wsi, const char *name, char *buf, p += bl; n -= (int)bl; - while (n-- > (int)bl) { + while (n-- > 0) { if (*p == '=' && !memcmp(p - bl, name, (unsigned int)bl)) { p++; while (*p != ';' && n-- && max) {