diff --git a/0003-client-hs-fix-segmentation-fault.patch b/0003-client-hs-fix-segmentation-fault.patch new file mode 100644 index 0000000000000000000000000000000000000000..c825b8b3f4460a2fff23611d28903deada6f0bd0 --- /dev/null +++ b/0003-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 91006a22b53d03f7445445d51f8d2940c67c6910..cf379316433f01be2e0522e054ca6a6ffcfc63e6 100644 --- a/libwebsockets.spec +++ b/libwebsockets.spec @@ -1,6 +1,6 @@ Name: libwebsockets Version: 4.3.3 -Release: 1 +Release: 2 Summary: A lightweight C library for Websockets License: LGPLv2 and Public Domain and BSD and MIT and zlib URL: https://libwebsockets.org @@ -8,6 +8,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-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.3-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:client hs: fix segmentation fault + * Wed Dec 27 2023 Paul Thomas - 4.3.3-1 - Type: requirement - ID: NA