Blame SOURCES/wget-1.14-fix-double-free-of-iri-orig_url.patch

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