diff options
author | phk <phk@FreeBSD.org> | 1996-01-22 13:21:33 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-01-22 13:21:33 +0000 |
commit | 285a427184f99b06c5b365e09b169f2c41abcc19 (patch) | |
tree | 461d8dd405b36526fe1901dc0af58bcdeac3e042 /sys/kern/subr_prf.c | |
parent | 86b8da3dd43592aabd9387d05e7f4cac2b98d6a1 (diff) | |
download | FreeBSD-src-285a427184f99b06c5b365e09b169f2c41abcc19.zip FreeBSD-src-285a427184f99b06c5b365e09b169f2c41abcc19.tar.gz |
bounds check the radix, just in case.
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r-- | sys/kern/subr_prf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 0ca44f8..358ca7c 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)subr_prf.c 8.3 (Berkeley) 1/21/94 - * $Id: subr_prf.c,v 1.24 1996/01/19 11:38:18 phk Exp $ + * $Id: subr_prf.c,v 1.25 1996/01/19 21:05:52 phk Exp $ */ #include "opt_ddb.h" @@ -439,6 +439,10 @@ kvprintf(char const *fmt, void (*func)(int, void*), void *arg, int radix, va_lis if (fmt == NULL) fmt = "(fmt null)\n"; + + if (radix < 8 || radix > 16) + radix = 10; + for (;;) { padc = ' '; width = 0; |