On Samstag, 8. April 2017 18:55:12 CEST Gisle Vanem wrote:
> > Ups, I was sure that we already reallocate the idn2 memory in iri.c/
> > idn_encode(), but we don't do that yet.
>
> You're confusing Wget with Wget2 :-)
Yes, I guess so too :-)
> > Could you please try this patch (on top of the
A bit simpler patch:
--- a/url.c 2017-04-08 11:24:21
+++ b/url.c 2017-04-08 12:01:07
@@ -943,7 +943,8 @@
if (new)
{
xfree (u->host);
- u->host = new;
+ u->host = xstrdup (new);
+ idn2_free (new);
Ups, I was sure that we already reallocate the idn2 memory in iri.c/
idn_encode(), but we don't do that yet.
Could you please try this patch (on top of the current master):
diff --git a/src/iri.c b/src/iri.c
index 2a4da1de..75eaeea6 100644
--- a/src/iri.c
+++ b/src/iri.c
@@ -290,6 +290,13 @@
Tim Rühsen wrote:
Thanks, Gisle.
pushed with several additional fixes/cleanups regarding idn2.
Too much cleanups I guess since it's crashing because no
'idn2_free()' called when needed. This works here:
--- a/url.c 2017-04-08 11:24:21
+++ b/url.c 2017-04-08 11:38:37
@@ -944,6 +944,7 @@
Thanks, Gisle.
pushed with several additional fixes/cleanups regarding idn2.
Regards, Tim
On Samstag, 8. April 2017 10:09:22 CEST Gisle Vanem wrote:
> The 'idn_decode()' function now simply uses 'xstrdup()'.
> And in host.c + connect.c there are calls to 'idn2_free()'
> on this pointer:
> if
The 'idn_decode()' function now simply uses 'xstrdup()'.
And in host.c + connect.c there are calls to 'idn2_free()'
on this pointer:
if (opt.enable_iri && (name = idn_decode ((char *) print)) != NULL)
{
int len = strlen (print) + strlen (name) + 4;
str = xmalloc (len);
snprintf (str,