1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

http: cookie_get

The loop check shouldn't care about bl any more, since we snipped bl from n
already.
This commit is contained in:
DerKleinePunk 2021-12-02 09:18:23 +00:00 committed by Andy Green
parent 122cf591a3
commit 0bc5b58ee3

View file

@ -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) {