From f42c1064cef3b398b99c8ab5b6367e7b9fc551a0 Mon Sep 17 00:00:00 2001 From: Silas Parker Date: Mon, 18 Jun 2018 18:41:46 +0800 Subject: [PATCH] client: off-by-one in redirect max length calc https://libwebsockets.org/pipermail/libwebsockets/2018-June/003729.html --- lib/roles/http/client/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/roles/http/client/client.c b/lib/roles/http/client/client.c index c4a4172a2..bb721ec75 100644 --- a/lib/roles/http/client/client.c +++ b/lib/roles/http/client/client.c @@ -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; }