summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2003-02-22 22:50:35 +0000
committerJason Wright <jason@cvs.openbsd.org>2003-02-22 22:50:35 +0000
commit15a865f73c4cbeb0615c341f14ea699e762247cb (patch)
tree731ed34e446c24158b24c2c54cd2727164503d64
parentfc4d473eed934a024117cd7db864e0176ed14fd8 (diff)
check for a NULL tag in bus_space_render_tag() so that other debug code doesn't crash.
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index 24a97dab2d0..346a2b151b7 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.55 2003/02/17 01:29:20 henric Exp $ */
+/* $OpenBSD: machdep.c,v 1.56 2003/02/22 22:50:34 jason Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -2139,6 +2139,10 @@ bus_space_vaddr(bus_space_tag_t t, bus_space_handle_t h)
void
bus_space_render_tag(bus_space_tag_t t, char* buf, size_t len)
{
+ if (t == NULL) {
+ strlcat(buf, "<NULL>", len);
+ return;
+ }
buf[0] = '\0';
if (t->parent)
bus_space_render_tag(t->parent, buf, len);