diff options
author | DerKleinePunk <derkleinepunk@user.github.invalid> | 2021-12-02 09:18:23 +0000 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2021-12-02 09:46:46 +0000 |
commit | 0bc5b58ee3bf103ba78b6ccacbc58395e3825f8a (patch) | |
tree | 24d9f234094b6a44eaa456d127edf714a8612d50 | |
parent | 122cf591a3b573f5a78299602faabf364e6c99be (diff) | |
download | libwebsockets-0bc5b58ee3bf103ba78b6ccacbc58395e3825f8a.tar.gz |
http: cookie_get
The loop check shouldn't care about bl any more, since we snipped bl from n
already.
-rw-r--r-- | lib/roles/http/parsers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/roles/http/parsers.c b/lib/roles/http/parsers.c index 446bc986..220f9cf8 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) { |