[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] [PATCH] the libidn problem
From: |
Tim Ruehsen |
Subject: |
Re: [Bug-wget] [PATCH] the libidn problem |
Date: |
Wed, 01 Jul 2015 12:57:31 +0200 |
User-agent: |
KMail/4.14.2 (Linux/4.0.0-2-amd64; KDE/4.14.2; x86_64; ; ) |
On Wednesday 01 July 2015 12:28:23 Ander Juaristi wrote:
> On 06/30/2015 02:47 PM, Tim Ruehsen wrote:
> > Thanks Hubert, good catch.
> >
> > I add the amended patch for completeness.
> >
> > Tim
Hi Ander,
> I amended some enhancements on top of your patch.
>
> - Check sequences of length 5 and 6. I don't see any reason not to check
The reason is they are not valid (either not defined or not valid regarding
RFC 3629).
> - Removed the call to quote() at idn_encode() since it segfaults with
> 0xFC (the same test proposed by the reporters of #45236).
The reason is simply a bug in my code.
xfree (utf8_encoded);
logprintf (LOG_VERBOSE, _("Invalid UTF-8 sequence: %s\n"),
quote(utf8_encoded));
Instead it should be
logprintf (LOG_VERBOSE, _("Invalid UTF-8 sequence: %s\n"),
quote(utf8_encoded));
xfree (utf8_encoded);
It didn't crash here, but I should have checked it with valgrind to make sure
:-(
> - General reworking to avoid code repetition.
If we don't check length 5 + 6, introducing a loop in a loop seems ineffective
to me (regarding CPU utilization). But I don't really mind... so if you insist
on using the second loop, we do it.
Thanks for your work !
Regards, Tim
signature.asc
Description: This is a digitally signed message part.