This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] manual/stdio.texi: asprintf clarification


2006-10-05  Dmitry V. Levin  <ldv@altlinux.org>

	* manual/stdio.texi (Dynamic Output): Note that in case of
	failure asprintf leaves pointer addressed by ptr argument in
	undefined state.

--- glibc-2.5.orig/manual/stdio.texi
+++ glibc-2.5/manual/stdio.texi
@@ -2398,7 +2398,8 @@ to the newly allocated string at that lo
 
 The return value is the number of characters allocated for the buffer, or
 less than zero if an error occurred. Usually this means that the buffer
-could not be allocated.
+could not be allocated, and the value stored at the address pointed by
+the @var{ptr} argument in this situation is undefined.
 
 Here is how to use @code{asprintf} to get the same result as the
 @code{snprintf} example, but more easily:

-- 
ldv

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]