Signed-off-by: liuxu <liuxu156@huawei.com> (cherry picked from commit 734d9e798029860d7fdd9905ae46a1da84deda10)
29 lines
859 B
Diff
29 lines
859 B
Diff
From fdde9119f72f315a453d30c3f7448cbccc69fa8a Mon Sep 17 00:00:00 2001
|
|
From: zzblydia <13098426+zzblydia@users.noreply.github.com>
|
|
Date: Mon, 24 Jun 2024 15:11:17 +0800
|
|
Subject: [PATCH] client hs: fix segmentation fault
|
|
|
|
reason:sync with upstream
|
|
Conflict:NA
|
|
Reference:https://github.com/warmcat/libwebsockets/pull/3171
|
|
---
|
|
lib/roles/http/client/client-http.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/lib/roles/http/client/client-http.c b/lib/roles/http/client/client-http.c
|
|
index 57dda701..05532f29 100644
|
|
--- a/lib/roles/http/client/client-http.c
|
|
+++ b/lib/roles/http/client/client-http.c
|
|
@@ -1641,6 +1641,8 @@ lws_generate_client_handshake(struct lws *wsi, char *pkt)
|
|
// if (!wsi->client_pipeline)
|
|
// conn1 = "close, ";
|
|
p = lws_generate_client_ws_handshake(wsi, p, conn1);
|
|
+ if (!p)
|
|
+ return NULL;
|
|
} else
|
|
#endif
|
|
{
|
|
--
|
|
2.43.0
|
|
|