1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +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:37:12 +08:00 committed by Andy Green
parent 8b21b32ae5
commit b30af71ad8

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;
}