[PATCH] printf.3: Add a note about sprintf(s, "%s", s)

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

 



The result of this operation is undefined as specified in C99, see

	http://sourceware.org/bugzilla/show_bug.cgi?id=7075

Signed-off-by: Petr Baudis <pasky@xxxxxxx>

diff --git a/man3/printf.3 b/man3/printf.3
index b2ed86a..f8377a7 100644
--- a/man3/printf.3
+++ b/man3/printf.3
@@ -750,6 +750,9 @@ or
 The array must contain a terminating null wide character, unless a
 precision is given and it is so small that the number of bytes written
 exceeds it before the end of the array is reached.
+
+If the source array and the target buffer of the function overlap,
+results are undefined.
 .TP
 .B C
 (Not in C99, but in SUSv2.)
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux