bug-wget
[Top][All Lists]
Advanced

[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 15:05:14 +0200
User-agent: KMail/4.14.2 (Linux/4.0.0-2-amd64; KDE/4.14.2; x86_64; ; )

On Wednesday 01 July 2015 13:44:08 Ander Juaristi wrote:
> On 07/01/2015 01:28 PM, Tim Ruehsen wrote:
> > Definitely not. If quote() doesn't work, Wget wouldn't work at all.
> 
> I wasn't implying quote() is broken. As you say, if it was broken, Wget
> would not work at all, and it works alright in my box. Also, 'make check'
> does well. It only segfaults when I input 0xFC, that's what I meant from
> the beginning. And since _utf8_is_valid() should work with even invalid
> sequences...
> 
> 'gdb' traces it to quotearg.c:343:
> 
>      for (i = 0;  ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize); 
> i++)
> 
> I have no gcc optimizations applied, so it should be pretty accurate. Will
> look further, don't have time now.
> 
> Can anybody else reproduce this? Maybe I'm missing something?

Very easy. It has to be
      logprintf (LOG_VERBOSE, _("Invalid UTF-8 sequence: %s\n"),
                 quote(utf8_encoded ? utf8_encoded : host));

else we call quote(NULL) which crashes. It should either output "(null)" or 
NULL, but it should not crash.

Tim




reply via email to

[Prev in Thread] Current Thread [Next in Thread]