summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/printf.3
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-04-18 03:01:36 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-04-18 03:01:36 +0000
commitc2d5d31832de35b48a0e487f90b9a58abeb3a8ea (patch)
tree3dcc33b96ac33fca8fde9f5dff0db0a5afbb6ae4 /lib/libc/stdio/printf.3
parentb6a043747e2041e97decf4b4c5a3b51c3b40b722 (diff)
Repairs, mostly removing hard sentence breaks.
Diffstat (limited to 'lib/libc/stdio/printf.3')
-rw-r--r--lib/libc/stdio/printf.331
1 files changed, 18 insertions, 13 deletions
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
index d76e8327b37..66c0aa25ea6 100644
--- a/lib/libc/stdio/printf.3
+++ b/lib/libc/stdio/printf.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: printf.3,v 1.24 2000/04/15 02:15:24 aaron Exp $
+.\" $OpenBSD: printf.3,v 1.25 2000/04/18 03:01:35 aaron Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -301,8 +301,9 @@ the field width.
An optional precision, in the form of a period
.Sq Cm \&.
followed by an
-optional digit string. If the digit string is omitted, the precision
-is taken as zero. This gives the minimum number of digits to appear for
+optional digit string.
+If the digit string is omitted, the precision is taken as zero.
+This gives the minimum number of digits to appear for
.Cm d ,
.Cm i ,
.Cm o ,
@@ -438,7 +439,8 @@ or unsigned hexadecimal
.Pf ( Cm x
and
.Cm X )
-notation. The letters
+notation.
+The letters
.Cm abcdef
are used for
.Cm x
@@ -554,8 +556,9 @@ No argument is converted.
.It Cm %
A
.Ql %
-is written. No argument is converted. The complete conversion specification
-is
+is written.
+No argument is converted.
+The complete conversion specification is
.Ql %% .
.El
.Pp
@@ -632,7 +635,8 @@ The functions
.Fn asprintf
and
.Fn vasprintf
-first appeared in the GNU C library. This implementation first appeared in
+first appeared in the GNU C library.
+This implementation first appeared in
.Ox 2.3 .
.Sh CAVEATS
The conversion formats
@@ -681,13 +685,14 @@ interface is not portable.
Never print a user-supplied string directly as a format without using
.Cm %s ,
as an attacker can put format specifiers in that string to mangle
-your stack. Be sure to use the proper secure idiom:
+your stack.
+Be sure to use the proper secure idiom:
.Bd -literal -offset indent
snprintf(buffer, sizeof(buffer), "%s", string)
.Ed
.Pp
-There is no way for printf to know the size of each argument passed. If
-you use positional arguments you must ensure that all parameters, up to the
-last positionally specified parameter, are used in the format string. This
-allows for the format string to be parsed for this information. Failure
-to do this will mean your code is non-portable and liable to fail.
+There is no way for printf to know the size of each argument passed.
+If you use positional arguments you must ensure that all parameters, up to the
+last positionally specified parameter, are used in the format string.
+This allows for the format string to be parsed for this information.
+Failure to do this will mean your code is non-portable and liable to fail.