Re: vasnprintf and invalid format string

2009-11-25 Thread Bruno Haible
Eric Blake wrote: > So, it may be worth a mention in the docs that *printf behaves differently > on various platforms when given an invalid string (in the case of my > example string, both Solaris and glibc return success! rather than failing > with EINVAL, but with differing amounts and content of

Re: vasnprintf and invalid format string

2009-11-25 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 11/25/2009 2:21 AM: >> On the cygwin list, it was pointed out that printf("%**s",1,"a","b") >> proceeds to try to print "b" with a field width of whatever the integer >> value of the pointer to "a" contained (or, in other w

Re: vasnprintf and invalid format string

2009-11-25 Thread Bruno Haible
Hi Eric, > On the cygwin list, it was pointed out that printf("%**s",1,"a","b") > proceeds to try to print "b" with a field width of whatever the integer > value of the pointer to "a" contained (or, in other words, each additional > * consumes another vararg position off the stack). This quickly

vasnprintf and invalid format string

2009-11-24 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On the cygwin list, it was pointed out that printf("%**s",1,"a","b") proceeds to try to print "b" with a field width of whatever the integer value of the pointer to "a" contained (or, in other words, each additional * consumes another vararg position o