bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: %.1s format with vasnprintf reads more than one byte from argument


From: Bruno Haible
Subject: Re: %.1s format with vasnprintf reads more than one byte from argument
Date: Fri, 27 Feb 2009 12:22:33 +0100
User-agent: KMail/1.9.9

Eric Blake wrote:
> >     if (sprintf (buf, "%ls", wstring) != -1)
> >       return 2;
> > because it does not fail on any known platform.
> 
> Actually, it DOES fail, on cygwin 1.7.0.  But that is due to a bug in
> cygwin wctomb[1]

So, activating the *printf replacements for this bug would not help, because
the code in vasnprintf uses wcrtomb and would therefore exhibit the same
behaviour as Cygwin's *printf. [1][2] Right?

Bruno


[1]  
http://cygwin.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdlib/wctomb_r.c?rev=1.8&content-type=text/x-cvsweb-markup&cvsroot=src
[2] 
http://cygwin.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdlib/wctomb.c?rev=1.3&content-type=text/x-cvsweb-markup&cvsroot=src




reply via email to

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