Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ulfius for openSUSE:Factory checked in at 2026-09-04 12:38:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ulfius (Old) and /work/SRC/openSUSE:Factory/.ulfius.new.1265 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ulfius" Fri Sep 4 12:38:19 2026 rev:32 rq:1375431 version:2.7.15 Changes: -------- --- /work/SRC/openSUSE:Factory/ulfius/ulfius.changes 2023-11-20 21:20:30.524928131 +0100 +++ /work/SRC/openSUSE:Factory/.ulfius.new.1265/ulfius.changes 2026-09-04 12:38:52.454347838 +0200 @@ -1,0 +2,10 @@ +Wed Sep 2 11:42:41 UTC 2026 - Martin Hauke <[email protected]> + +- Temporarily build with "-Wno-error=discarded-qualifiers" to fix + build errors on TW. +- Add patches to fix builds for TW: + * 0001-Fix-lenght-length-typo-2-occurrences-in-API.md-287.patch + * 0002-Fix-under-allocation-in-ulfius_websocket_pop_first_m.patch +- Use ldconfig_scriptlets macro. + +------------------------------------------------------------------- New: ---- 0001-Fix-lenght-length-typo-2-occurrences-in-API.md-287.patch 0002-Fix-under-allocation-in-ulfius_websocket_pop_first_m.patch ----------(New B)---------- New:- Add patches to fix builds for TW: * 0001-Fix-lenght-length-typo-2-occurrences-in-API.md-287.patch * 0002-Fix-under-allocation-in-ulfius_websocket_pop_first_m.patch New: * 0001-Fix-lenght-length-typo-2-occurrences-in-API.md-287.patch * 0002-Fix-under-allocation-in-ulfius_websocket_pop_first_m.patch - Use ldconfig_scriptlets macro. ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ulfius.spec ++++++ --- /var/tmp/diff_new_pack.xfI2Cs/_old 2026-09-04 12:38:53.123371340 +0200 +++ /var/tmp/diff_new_pack.xfI2Cs/_new 2026-09-04 12:38:53.125371410 +0200 @@ -1,7 +1,7 @@ # # spec file for package ulfius # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # Copyright (c) 2018-2023, Martin Hauke <[email protected]> # # All modifications and additions to the file contributed by third parties @@ -27,6 +27,8 @@ Group: Development/Languages/C and C++ URL: https://github.com/babelouest/ulfius Source: https://github.com/babelouest/ulfius/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: 0001-Fix-lenght-length-typo-2-occurrences-in-API.md-287.patch +Patch1: 0002-Fix-under-allocation-in-ulfius_websocket_pop_first_m.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig @@ -77,9 +79,10 @@ A simple command-line websocket client program. %prep -%setup -q +%autosetup -p1 %build +export CFLAGS="%{optflags} -Wno-error=discarded-qualifiers" %cmake \ -DDOWNLOAD_DEPENDENCIES=OFF \ -DCMAKE_SHARED_LINKER_FLAGS="" \ @@ -90,8 +93,7 @@ %cmake_install rm -rf %{buildroot}/%{_datadir}/doc/ -%post -n libulfius%{sover} -p /sbin/ldconfig -%postun -n libulfius%{sover} -p /sbin/ldconfig +%ldconfig_scriptlets -n libulfius%{sover} %files -n libulfius%{sover} %license LICENSE ++++++ 0001-Fix-lenght-length-typo-2-occurrences-in-API.md-287.patch ++++++ >From 6138532f07165d44ddd0bcca9571cb4544ca2506 Mon Sep 17 00:00:00 2001 From: Pikammmmm <[email protected]> Date: Sat, 2 May 2026 03:04:26 +0200 Subject: [PATCH 1/2] Fix `lenght` -> `length` typo (2 occurrences) in API.md (#287) --- API.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/API.md b/API.md index 73a67a7..294a082 100644 --- a/API.md +++ b/API.md @@ -1596,7 +1596,7 @@ int websocket_extension_server_match(const char * extension_client, int websocket_extension_client_match(const char * extension_server, void * user_data, void ** context); ``` -The callback function `websocket_extension_message_out_perform` can modify the message data and data lenght and the RSV flags. The callback function `websocket_extension_message_in_perform` can modify the message data only. Inside these functions, `data_in` and `data_len_in` are the current data, your extension callback function must update `data_out` with a `o_malloc`'ed data and set the new data length using `data_len_out` and return `U_OK` on success. +The callback function `websocket_extension_message_out_perform` can modify the message data and data length and the RSV flags. The callback function `websocket_extension_message_in_perform` can modify the message data only. Inside these functions, `data_in` and `data_len_in` are the current data, your extension callback function must update `data_out` with a `o_malloc`'ed data and set the new data length using `data_len_out` and return `U_OK` on success. If your function doesn't return `U_OK`, the message data won't be updated and `data_out` won't be free'd if set. You can call `ulfius_add_websocket_extension_message_perform` or `ulfius_add_websocket_client_extension_message_perform` multiple times for a websocket definition. In that case the extension callbacks function will be called in the same order for the `websocket_extension_message_out_perform` callbacks, and in reverse order for the `websocket_extension_message_in_perform` callbacks. @@ -1652,7 +1652,7 @@ int ulfius_websocket_send_close_signal(struct _websocket_manager * websocket_man /** * Returns the status of the websocket connection * Returned values can be U_WEBSOCKET_STATUS_OPEN or U_WEBSOCKET_STATUS_CLOSE - * wether the websocket is open or closed, or U_WEBSOCKET_STATUS_ERROR on error + * whether the websocket is open or closed, or U_WEBSOCKET_STATUS_ERROR on error */ int ulfius_websocket_status(struct _websocket_manager * websocket_manager); @@ -1660,7 +1660,7 @@ int ulfius_websocket_status(struct _websocket_manager * websocket_manager); * Wait until the websocket connection is closed or the timeout in milliseconds is reached * if timeout is 0, no timeout is set * Returned values can be U_WEBSOCKET_STATUS_OPEN or U_WEBSOCKET_STATUS_CLOSE - * wether the websocket is open or closed, or U_WEBSOCKET_STATUS_ERROR on error + * whether the websocket is open or closed, or U_WEBSOCKET_STATUS_ERROR on error */ int ulfius_websocket_wait_close(struct _websocket_manager * websocket_manager, unsigned int timeout); ``` @@ -1798,7 +1798,7 @@ int ulfius_websocket_client_connection_close(struct _websocket_client_handler * /** * Returns the status of the websocket client connection * Returned values can be U_WEBSOCKET_STATUS_OPEN or U_WEBSOCKET_STATUS_CLOSE - * wether the websocket is open or closed, or U_WEBSOCKET_STATUS_ERROR on error + * whether the websocket is open or closed, or U_WEBSOCKET_STATUS_ERROR on error */ int ulfius_websocket_client_connection_status(struct _websocket_client_handler * websocket_client_handler); @@ -1806,7 +1806,7 @@ int ulfius_websocket_client_connection_status(struct _websocket_client_handler * * Wait until the websocket client connection is closed or the timeout in milliseconds is reached * if timeout is 0, no timeout is set * Returned values can be U_WEBSOCKET_STATUS_OPEN or U_WEBSOCKET_STATUS_CLOSE - * wether the websocket is open or closed, or U_WEBSOCKET_STATUS_ERROR on error + * whether the websocket is open or closed, or U_WEBSOCKET_STATUS_ERROR on error */ int ulfius_websocket_client_connection_wait_close(struct _websocket_client_handler * websocket_client_handler, unsigned int timeout); ``` @@ -1849,7 +1849,7 @@ int ulfius_send_http_request(const struct _u_request * request, struct _u_respon /** * ulfius_send_http_request_with_limit * Send a HTTP request and store the result into a _u_response - * The response body lenght and number of parsed headers can be limited + * The response body length and number of parsed headers can be limited * @param request the struct _u_request that contains all the input parameters to perform the HTTP request * @param response the struct _u_response that will be filled with all response parameter values, optional, may be NULL * @param response_body_limit the maximum size of the response body to retrieve, 0 means no limit -- 2.55.0 ++++++ 0002-Fix-under-allocation-in-ulfius_websocket_pop_first_m.patch ++++++ >From 191cfde1d8622bd746e299f1c37f120b47c69ed1 Mon Sep 17 00:00:00 2001 From: 94xhn <[email protected]> Date: Tue, 14 Jul 2026 07:31:10 +0800 Subject: [PATCH 2/2] Fix under-allocation in ulfius_websocket_pop_first_message realloc message_list->list is an array of struct _websocket_message pointers, but the realloc() call in ulfius_websocket_pop_first_message() was sizing the shrunk buffer in raw byte count ((len-1)) instead of ((len-1) * sizeof(struct _websocket_message *)), matching the correct pattern already used a few lines above in ulfius_push_websocket_message() (o_realloc(..., (len+1)*sizeof(struct _websocket_message *))). On a 64-bit build this under-allocates the array by a factor of 8, so any list index write past the first pointer touches unallocated heap memory. Draining a message list via repeated ulfius_websocket_pop_first_message() calls (the documented usage pattern in API.md, and the default behavior since keep_messages defaults to U_WEBSOCKET_KEEP_INCOMING|U_WEBSOCKET_KEEP_OUTCOMING) reliably corrupts the heap after a handful of pops. --- src/u_websocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/u_websocket.c b/src/u_websocket.c index 8592603..a066a17 100644 --- a/src/u_websocket.c +++ b/src/u_websocket.c @@ -1646,7 +1646,7 @@ struct _websocket_message * ulfius_websocket_pop_first_message(struct _websocket message_list->list[len] = message_list->list[len+1]; } if (message_list->len > 1) { - message_list->list = o_realloc(message_list->list, (message_list->len-1)); + message_list->list = o_realloc(message_list->list, (message_list->len-1)*sizeof(struct _websocket_message *)); } else { o_free(message_list->list); message_list->list = NULL; -- 2.55.0
