Bug in glibc 2 vsnprintf

Andreas Jaeger aj@arthur.rhein-neckar.de
Tue Aug 18 15:00:00 GMT 1998


>>>>> Ulrich Drepper writes:

Uli> hjl@lucon.org (H.J. Lu) writes:
>> Should we also change glibc 2.0?

Uli> No.  The old implementation is reasonable.
But there's one thing that just stroke me (as pointed out in the
original email)
vsnprintf(s, 10, 12345) returned 5 <- ok
vsnprintf(s, 1, 123) returned 3 <- AFAIK not according to the old
				   specification (should be -1)
vsnprintf(s, 2, 123) returned -1 <- ok

Changing the interface of vsnprintf now for glibc 2.0.7 is IMHO
not a good idea now - but can we live with this bug?

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@alma.student.uni-kl.de



More information about the Libc-hacker mailing list