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

Re: varbufprintf is broken



Richard Kettlewell <rjk@sfere.greenend.org.uk> writes:

   According to the man page I have here vsnprintf() returns -1 on
   overflow (and indeed this appears to be true).  This patch should cope
   with that case.

Just for future reference:

	* glibc 2.0 returns -1 on overflow with *snprintf().

	* glibc 2.1, adhering to the draft C9x standard, returns the
	  number of characters that would be written if there was
	  room, excluding the trailing null.

Your patch looks good to me too, but I didn't test it either.
-- 
Regarding a Microsoft/Xerox agreement:
	"This is a match made in heaven. 
	 Both companies excel at copying other people's work."
--douglas@min.net <URL:http://slashdot.org/article.pl?sid=99/05/16/2211252>


Reply to: