kris 0f958ee746 Add fmtcheck(), a function for checking consistency of format string
arguments where the format string is obtained from user data, or
otherwise difficult to verify statically.

Example usage:

printf(fmtcheck(user_format, standard_format), arg1, arg2);

checks the format string user_format for consistency (same number/order/
type of format operators) with standard_format.  If they differ,
standard_format is used instead to avoid potential crashes or security
violations.

Obtained from:  NetBSD
Reviewed by:    -arch
2001-04-17 07:59:52 +00:00
..
2001-02-26 13:23:47 +00:00
2000-12-29 14:08:20 +00:00
1999-08-28 05:11:36 +00:00
2000-11-14 11:20:58 +00:00
1999-08-28 00:22:10 +00:00
1999-04-24 18:28:24 +00:00
2001-02-26 13:23:47 +00:00
2000-04-21 09:42:15 +00:00
1999-08-28 00:22:10 +00:00
1999-08-28 00:22:10 +00:00
1998-08-02 14:41:34 +00:00
2001-02-26 13:23:47 +00:00
1999-08-28 00:22:10 +00:00
2000-12-17 21:10:41 +00:00
2000-12-29 14:08:20 +00:00
1999-08-28 00:22:10 +00:00
2000-12-29 14:08:20 +00:00
1999-08-28 00:22:10 +00:00
log
2000-11-22 09:23:54 +00:00
2001-02-26 13:23:47 +00:00
2000-12-29 14:08:20 +00:00
2001-02-26 13:23:47 +00:00
2001-02-26 09:15:17 +00:00
2000-12-29 14:08:20 +00:00
2000-11-14 11:20:58 +00:00
1999-08-28 00:22:10 +00:00
2001-03-05 09:21:44 +00:00
2001-02-26 13:23:47 +00:00
2000-12-29 14:08:20 +00:00
2001-03-05 09:33:08 +00:00
2001-02-26 15:16:43 +00:00
2001-02-26 15:16:43 +00:00
2001-02-26 15:16:43 +00:00
2001-02-26 15:16:43 +00:00
2001-02-26 15:16:43 +00:00
2001-02-26 15:16:43 +00:00
1999-08-28 00:22:10 +00:00
2001-02-26 13:23:47 +00:00
log
2000-11-22 09:23:54 +00:00
1999-08-28 00:22:10 +00:00
1999-08-28 00:22:10 +00:00
1999-08-28 00:22:10 +00:00
1999-08-28 00:22:10 +00:00
2001-02-26 16:12:39 +00:00
2001-02-26 16:12:39 +00:00
1999-08-28 00:22:10 +00:00
2001-04-04 09:52:28 +00:00
2001-01-16 09:08:22 +00:00
2000-12-29 14:08:20 +00:00
2000-12-29 14:08:20 +00:00
2000-12-29 14:08:20 +00:00