Commit Graph

11 Commits

Author SHA1 Message Date
simonb
618d628845 Reverse the if and else clauses for the chardata test if there is
no format string specified.

Fixes PR bin/12424 from Jim Bernard.
2001-03-17 11:43:06 +00:00
jdolecek
507cbfd5d0 Use patch provided Paul Janzen <pjanzen@OpenBSD.org> to fix
bin/12316 more completely.
Highlights:
* we only allow explicitly specified set of (numberic) formats
* %% is correctly skipped, extra %foo formats are detected
* '*' in format specification is not allowed

The code in getformat() is slighly different to the OpenBSD version
of fix - the list of allowed printf(3) flags is explicit and the
condition checking 'chardata' is written slighly differently.

Also pull-in some cosmetic changes from OpenBSD - s/isdefault()/is_default()/,
error() -> errx(), usage().
2001-03-14 07:50:06 +00:00
jdolecek
13cb1a6488 Don't coredump if format given via -w doesn't contain alphanumeric
character; in such case, warn user the format is invalid.

This addresses bin/12316 by Perry E. Metzger.
2001-03-02 21:17:31 +00:00
is
135600f947 More format string cleanup by sommerfeld. 2000-10-11 14:46:00 +00:00
mycroft
a1c657fe56 Clean up SYNOPSIS formatting. 1999-03-07 11:29:58 +00:00
christos
844b3dce90 char -> unsigned char 1998-12-19 17:06:20 +00:00
mycroft
a2fa91a9c4 Reformat in mandoc. 1997-11-01 04:58:39 +00:00
lukem
ac4e9aa74a WARNSify, fix .Nm usage, deprecate register, use <err.h> 1997-10-19 03:32:11 +00:00
pk
22e62219f7 Allocate proper storage.
Avoid interpretation of boring words as printf(3) style format strings.
1994-12-02 20:29:43 +00:00
jtc
6e0c4ded79 Changed to conform to NetBSD's new RCS Id convention. 1994-11-14 20:27:21 +00:00
jtc
9636069c3e imported from 4.4lite 1994-11-14 20:11:58 +00:00