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

client: off-by-one in redirect max length calc

https://libwebsockets.org/pipermail/libwebsockets/2018-June/003729.html
This commit is contained in:
Silas Parker 2018-06-18 18:41:46 +08:00 committed by Andy Green
parent f195550972
commit f42c1064ce

View file

@ -785,7 +785,7 @@ lws_client_interpret_server_handshake(struct lws *wsi)
q = strrchr(new_path, '/');
if (q)
lws_strncpy(q + 1, p, sizeof(new_path) -
(q - new_path));
(q - new_path) - 1);
else
path = p;
}