diff --git a/0004-client-hs-fix-segmentation-fault.patch b/0004-client-hs-fix-segmentation-fault.patch new file mode 100644 index 0000000000000000000000000000000000000000..c825b8b3f4460a2fff23611d28903deada6f0bd0 --- /dev/null +++ b/0004-client-hs-fix-segmentation-fault.patch @@ -0,0 +1,28 @@ +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 + diff --git a/libwebsockets.spec b/libwebsockets.spec index d3a887702db8bdf44944dcce344b40b23e7d6e64..dd08f9e06e342c0b2245b83630b42cc673cbde09 100644 --- a/libwebsockets.spec +++ b/libwebsockets.spec @@ -1,6 +1,6 @@ Name: libwebsockets Version: 4.3.0 -Release: 4 +Release: 5 Summary: A lightweight C library for Websockets License: LGPLv2 and Public Domain and BSD and MIT and zlib URL: https://libwebsockets.org @@ -9,6 +9,7 @@ Source0: https://github.com/warmcat/libwebsockets/archive/v%{version}.tar Patch9001: 0001-add-secure-compile-option-in-Makefile.patch Patch9002: 0002-solve-the-BEP-problem.patch Patch9003: 0003-route-extend-lws_route_uidx_t-from-1-byte-to-2-bytes.patch +Patch9004: 0004-client-hs-fix-segmentation-fault.patch BuildRequires: cmake openssl-devel zlib-devel libev-devel gcc gcc-c++ @@ -99,6 +100,12 @@ find %{buildroot} -name '*_static.pc' -exec rm -f {} ';' %doc changelog README.md READMEs/ %changelog +* Tue Aug 27 2024 liuxu - 4.3.0-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:client hs: fix segmentation fault + * Thu May 05 2022 zhangxiaoyu - 4.3.0-4 - Type:bugfix - ID:NA