Michael Kerrisk
08f8825735
printf.3: Source and destination buffers may not overlap for *s*printf()
...
http://sourceware.org/bugzilla/show_bug.cgi?id=7075
Some existing code relies on techniques like the following to
append text to a buffer:
$ cat s.c
#include <stdio.h>
char buf[80] = "not ";
main()
{
sprintf(buf, "%sfail", buf);
puts(buf);
return 0;
}
$ cc s.c
$ ./a.out
not fail
However, the standards say the results are undefined if source
and destination buffers overlap, and with suitable compiler
options, recent changes can cause unexpected results:
$ cc -v 2>&1 | grep gcc
gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] (SUSE Linux)
$ cc -D_FORTIFY_SOURCE -O2 s.c
$ ./a.out
fail
Reported-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-19 11:47:04 -05:00
Nicolas François
44e5793157
Typo and wording fixes
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 11:00:36 +02:00
Michael Kerrisk
c45bd688fd
s/floating point/floating-point/ when used attributively.
2008-07-23 02:57:20 +00:00
Michael Kerrisk
3cf81850db
tfix
2008-07-18 08:37:37 +00:00
Michael Kerrisk
c59f8dfefc
Many small formatting fixes.
2008-07-12 20:57:29 +00:00
Michael Kerrisk
512c4c1a1f
many ffixes
2008-07-12 20:49:46 +00:00
Michael Kerrisk
3d54a9102a
Wrapped long source lines
2008-07-06 15:10:32 +00:00
Michael Kerrisk
c45660d7d7
wrap long source lines
2008-06-09 21:12:25 +00:00
Michael Kerrisk
333a424b0e
Try and bring some consistency to quotes.
2008-06-09 21:03:52 +00:00
Michael Kerrisk
f81fb4445b
s/\\'/\\(aq/
2008-06-09 15:49:35 +00:00
Michael Kerrisk
b8b45978b0
/'/\\'/ to produce better UTF rendering
2008-06-05 19:01:25 +00:00
Michael Kerrisk
eba722884d
s/nonzero/non-zero/
2008-03-19 13:16:39 +00:00
Michael Kerrisk
a45ebabfc5
Rework/remove use of ".ad" macros.
2008-01-11 13:59:47 +00:00
Michael Kerrisk
2b53dd031e
Remove extraneous .br macro before/after .SH/.SS.
2008-01-01 13:38:33 +00:00
Michael Kerrisk
c382a36592
hyphenation fixes
2007-12-25 22:02:19 +00:00
Michael Kerrisk
363060058c
spfix
2007-12-23 09:17:10 +00:00
Michael Kerrisk
a6e2f12821
Make the standard indent for code samples, shell session
...
logs, etc. to be ".in +4n".
2007-12-19 07:19:23 +00:00
Michael Kerrisk
bd19142309
enclose code smaples/structure defns/etc in ".in +4n / .in"
2007-12-19 06:16:04 +00:00
Michael Kerrisk
324633ae2c
s/``...''/"..."/
2007-12-16 14:08:46 +00:00
Michael Kerrisk
31b640cb52
ffix
2007-12-10 14:48:43 +00:00
Michael Kerrisk
2ccfac8b3e
Update date in .TH line
2007-11-24 07:49:41 +00:00
Michael Kerrisk
f6b55d8222
Fix the discussion of stdarg macros in the description of vprintf() description.
2007-11-18 07:21:08 +00:00
Michael Kerrisk
b9d200cedb
Fix redundant formatting tags
2007-10-03 06:40:03 +00:00
Michael Kerrisk
0daa9e92d0
Fix redundant formatting macros
2007-09-20 16:26:31 +00:00
Michael Kerrisk
901f4e5d6c
ffix
2007-08-28 03:23:02 +00:00
Michael Kerrisk
74d3223314
ffix/spfix
2007-08-27 08:36:21 +00:00
Michael Kerrisk
cc4615cc78
Added/updated glibc feature test macro requirements
2007-07-08 12:11:40 +00:00
Michael Kerrisk
e3e255598e
Minor wording changes.
2007-06-25 10:03:10 +00:00
Michael Kerrisk
f19a0f03ee
ffix
2007-06-23 07:56:56 +00:00
Michael Kerrisk
2f0af33ba6
ffix
2007-06-22 19:42:52 +00:00
Michael Kerrisk
75b94dc35c
Change "e.g. " to "e.g., ", or in some cases, "for example, ".
...
Change "i.e. " to i.e.., ", or in some cases, "that is, ".
2007-06-08 11:56:22 +00:00
Michael Kerrisk
11050e1997
Add text to the introductory part of DESCRIPTION, about the
...
'size' argument of snprintf() and vsnprintf().
2007-06-07 13:17:35 +00:00
Michael Kerrisk
2b2581ee37
Fix inconsistencies in order of .SH sections
2007-05-19 04:30:20 +00:00
Michael Kerrisk
889829be48
Removed HISTORY section, or moved it as a subsection or paragraphs
...
under another section e.g., NOTES.
2007-05-18 11:59:14 +00:00
Michael Kerrisk
6996254443
Fix inconsistencies in .TH lines
2007-05-18 09:55:10 +00:00
Michael Kerrisk
fb18673428
Adding section numbers to xrefs toother pages
2007-05-12 00:30:29 +00:00
Michael Kerrisk
ca5ac06642
Fix incorrect use of "\-".
2007-04-27 17:04:30 +00:00
Michael Kerrisk
c13182efa3
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
...
white space.
2007-04-12 22:42:49 +00:00
Michael Kerrisk
7295b7eda0
Replaced tabs with spaces
2007-04-05 13:29:41 +00:00
Michael Kerrisk
cf0a9ace57
ffix
2007-04-05 12:36:57 +00:00
Michael Kerrisk
68e1685c25
Updated CONFORMING TO section
2006-08-03 13:57:30 +00:00
Michael Kerrisk
c15f96ddf8
Add documentation of %m.
2006-06-07 22:45:42 +00:00
Michael Kerrisk
9b33650560
wfix
2006-05-22 19:44:47 +00:00
Michael Kerrisk
9fcfcba05f
Added SEE ALSO entry referring to setlocale.3
2006-05-01 01:52:57 +00:00
Michael Kerrisk
28d88c1751
Global change to many pages...
...
Various pages use inconsistent terms for 'null byte' (which
is the C99/SUSv3 term for the '\0' character).
To rectify this the following changes were made in these pages:
Replace 'zero byte' with 'null byte'.
Replace 'null character' with 'null byte'.
Replace 'nulls' with 'null bytes'.
Replace 'NUL-terminated' by 'null-terminated'.
Replace 'NUL' by 'null byte'.
Replace 'terminating NUL' by 'terminating null byte'.
Replace 'final NUL' by 'terminating null byte'.
Replace 'NUL character' by 'null byte'.
2006-01-13 02:09:44 +00:00
Michael Kerrisk
8478ee0279
Formatting fixes
2005-11-02 13:55:25 +00:00
Michael Kerrisk
31e9a9ec99
Change itacised function names and page xrefs to bold
2005-11-02 11:34:24 +00:00
Michael Kerrisk
6e1ffb9817
Formatting fix
2005-10-28 13:43:45 +00:00
Michael Kerrisk
e1d6264d9f
Manual fixes for parentheses formatting
2005-10-19 07:29:28 +00:00
Michael Kerrisk
e511ffb6bc
Automated addition of parentheses by add_parens_for_own_funcs.sh
2005-10-19 06:54:38 +00:00