public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/wget2] f45: Backport a patch fixing program crash
@ 2026-10-31  7:47 Artur Frenszek-Iwicki
  0 siblings, 0 replies; only message in thread
From: Artur Frenszek-Iwicki @ 2026-10-31  7:47 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/wget2
            Branch : f45
            Commit : 46fd646e7c84951431f5727f88908570a5b9881c
            Author : Artur Frenszek-Iwicki <fedora@svgames.pl>
            Date   : 2026-10-30T12:42:37+01:00
            Stats  : +35/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/wget2/c/46fd646e7c84951431f5727f88908570a5b9881c?branch=f45

            Log:
            Backport a patch fixing program crash

Solves rhbz#2563343.

---
diff --git a/0001-fix-double-free.patch b/0001-fix-double-free.patch
new file mode 100644
index 0000000..920badd
--- /dev/null
+++ b/0001-fix-double-free.patch
@@ -0,0 +1,27 @@
+From 8d7b977a7dff86e7056fc93b7c73d61779d28cdc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
+Date: Tue, 20 Oct 2026 20:18:51 +0200
+Subject: [PATCH] * src/wget.c (http_send_request): Fix double free
+
+Fixes https://gitlab.com/gnuwget/wget2/-/work_items/729
+---
+ src/wget.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/wget.c b/src/wget.c
+index fe00c9014..4e2d2e620 100644
+--- a/src/wget.c
++++ b/src/wget.c
+@@ -4512,8 +4512,7 @@ int http_send_request(const wget_iri *iri, const wget_iri *original_url, DOWNLOA
+ 	wget_http_request_set_free_user_data_cb(req, free_user_data);
+ 
+ 	if ((rc = wget_http_send_request(conn, &req)) != WGET_E_SUCCESS) {
+-		wget_buffer_free(&context->body);
+-		xfree(context);
++		// context has already been freed by free_user_data
+ 		wget_http_free_request(&req);
+ 	}
+ 
+-- 
+GitLab
+

diff --git a/wget2.spec b/wget2.spec
index 64dbf3c..e9953a6 100644
--- a/wget2.spec
+++ b/wget2.spec
@@ -8,7 +8,7 @@
 
 Name:           wget2
 Version:        2.3.0
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        An advanced file and recursive website downloader
 
 # Documentation is GFDL
@@ -23,6 +23,10 @@ Source2:        tim.ruehsen-keyring.asc
 # Backport from upstream: https://github.com/rockdaboot/wget2/commit/acf7f4ecd35e9d353bfb5d3ad216dd5368f1b3d4
 Patch0:         0000-fix-absolute-paths-with-P-option.patch
 
+# Fix double-free causing a crash (only after failed requests)
+# Backport from upstream: https://gitlab.com/gnuwget/wget2/-/commit/8d7b977a7dff86e7056fc93b7c73d61779d28cdc
+Patch1:         0001-fix-double-free.patch
+
 # Buildsystem build requirements
 BuildRequires:  autoconf
 BuildRequires:  automake
@@ -183,6 +187,9 @@ echo ".so man1/%{name}.1" > %{buildroot}%{_mandir}/man1/wget.1
 
 
 %changelog
+* Fri Oct 30 2026 Artur Frenszek-Iwicki <fedora@svgames.pl> - 2.3.0-3
+- Backport a patch fixing program crash after failed request
+
 * Fri Oct 23 2026 Artur Frenszek-Iwicki <fedora@svgames.pl> - 2.3.0-2
 - Backport fix for using -P with absolute paths (rhbz#2558146)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-31  7:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31  7:47 [rpms/wget2] f45: Backport a patch fixing program crash Artur Frenszek-Iwicki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox