Blame SOURCES/wget-1.19.5-CVE-2019-5953.patch

15c8d9
diff --git a/src/iri.c b/src/iri.c
15c8d9
index 7dcf3ac..1c8695c 100644
15c8d9
--- a/src/iri.c
15c8d9
+++ b/src/iri.c
15c8d9
@@ -189,9 +189,10 @@ do_conversion (const char *tocode, const char *fromcode, char const *in_org, siz
15c8d9
         {
15c8d9
           tooshort++;
15c8d9
           done = len;
15c8d9
-          len = outlen = done + inlen * 2;
15c8d9
-          s = xrealloc (s, outlen + 1);
15c8d9
-          *out = s + done;
15c8d9
+          len = done + inlen * 2;
15c8d9
+          s = xrealloc (s, len + 1);
15c8d9
+          *out = s + done - outlen;
15c8d9
+          outlen += inlen * 2;
15c8d9
         }
15c8d9
       else /* Weird, we got an unspecified error */
15c8d9
         {