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