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: Eric Blake
Subject: Re: %.1s format with vasnprintf reads more than one byte from argument
Date: Fri, 27 Feb 2009 06:15:48 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 2/27/2009 4:22 AM:
> 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?

You are correct that a gnulib workaround for this particular cygwin bug
wouldn't help matters.  However, the cygwin bug is being fixed [1], and
since no released version of cygwin contains it, we don't have to worry
about it in gnulib.

[1] http://sourceware.org/ml/newlib/2009/msg00202.html

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmn54QACgkQ84KuGfSFAYCz9gCfdU63Bwa7+FEeIHSY0uDDdlAg
wagAn069QH03Vk8+RluZWqCVmyaIquvf
=2dKp
-----END PGP SIGNATURE-----




reply via email to

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