Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Check msgbufenabled before referencing msgbufp in p...
details: https://anonhg.NetBSD.org/src/rev/ca4a7ea0efbf
branches: trunk
changeset: 512599:ca4a7ea0efbf
user: fvdl <fvdl%NetBSD.org@localhost>
date: Tue Jul 10 20:40:56 2001 +0000
description:
Check msgbufenabled before referencing msgbufp in panic. Avoids
a NULL ptr reference if there is an early panic (i.e. before
initmsgbuf() was called).
diffstat:
sys/kern/subr_prf.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 85e2679058ff -r ca4a7ea0efbf sys/kern/subr_prf.c
--- a/sys/kern/subr_prf.c Tue Jul 10 20:23:36 2001 +0000
+++ b/sys/kern/subr_prf.c Tue Jul 10 20:40:56 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_prf.c,v 1.80 2001/05/30 15:24:25 lukem Exp $ */
+/* $NetBSD: subr_prf.c,v 1.81 2001/07/10 20:40:56 fvdl Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@@ -207,7 +207,7 @@
panicstr = fmt;
doing_shutdown = 1;
- if (msgbufp->msg_magic == MSG_MAGIC)
+ if (msgbufenabled && msgbufp->msg_magic == MSG_MAGIC)
panicstart = msgbufp->msg_bufx;
va_start(ap, fmt);
@@ -216,7 +216,7 @@
printf("\n");
va_end(ap);
- if (msgbufp->msg_magic == MSG_MAGIC)
+ if (msgbufenabled && msgbufp->msg_magic == MSG_MAGIC)
panicend = msgbufp->msg_bufx;
#ifdef IPKDB
Home |
Main Index |
Thread Index |
Old Index