Blame SOURCES/wget-1.14-fix-double-free-of-iri-orig_url.patch
|
|
226bdc |
From bdf2764457bef7c33be289b889ddf6df91773296 Mon Sep 17 00:00:00 2001
|
|
|
226bdc |
From: Tomas Hozza <thozza@redhat.com>
|
|
|
226bdc |
Date: Wed, 10 Jul 2013 13:23:37 +0200
|
|
|
226bdc |
Subject: [PATCH] Set iri->orig_url to NULL after free.
|
|
|
226bdc |
|
|
|
226bdc |
Set iri->orig_url to NULL after free to prevent double
|
|
|
226bdc |
free in retrieve_url() and iri_free() when using IRI
|
|
|
226bdc |
and downloading site that redirects itself.
|
|
|
226bdc |
|
|
|
226bdc |
Signed-off-by: Tomas Hozza <thozza@redhat.com>
|
|
|
226bdc |
---
|
|
|
226bdc |
src/retr.c | 1 +
|
|
|
226bdc |
1 file changed, 1 insertion(+)
|
|
|
226bdc |
|
|
|
226bdc |
diff --git a/src/retr.c b/src/retr.c
|
|
|
226bdc |
index 6204839..66624dc 100644
|
|
|
226bdc |
--- a/src/retr.c
|
|
|
226bdc |
+++ b/src/retr.c
|
|
|
226bdc |
@@ -838,6 +838,7 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file,
|
|
|
226bdc |
iri->utf8_encode = opt.enable_iri;
|
|
|
226bdc |
set_content_encoding (iri, NULL);
|
|
|
226bdc |
xfree_null (iri->orig_url);
|
|
|
226bdc |
+ iri->orig_url = NULL;
|
|
|
226bdc |
|
|
|
226bdc |
/* Now, see if this new location makes sense. */
|
|
|
226bdc |
newloc_parsed = url_parse (mynewloc, &up_error_code, iri, true);
|
|
|
226bdc |
--
|
|
|
226bdc |
1.8.3.1
|
|
|
226bdc |
|