File wget-buffer-overflow-CVE-2019-5953.patch of Package wget.10861

Index: wget-1.19.5/src/iri.c
===================================================================
--- wget-1.19.5.orig/src/iri.c
+++ wget-1.19.5/src/iri.c
@@ -189,9 +189,10 @@ do_conversion (const char *tocode, const
         {
           tooshort++;
           done = len;
-          len = outlen = done + inlen * 2;
-          s = xrealloc (s, outlen + 1);
-          *out = s + done;
+          len = done + inlen * 2;
+          s = xrealloc (s, len + 1);
+          *out = s + done - outlen;
+          outlen += inlen * 2;
         }
       else /* Weird, we got an unspecified error */
         {
openSUSE Build Service is sponsored by