diff options
author | bde <bde@FreeBSD.org> | 1994-10-30 20:55:44 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1994-10-30 20:55:44 +0000 |
commit | 423f808042c2237d4bdd7f71355eb4cf487bbd8d (patch) | |
tree | de994457a1313b42d6565cd06b5808b5e582effa /sys/ddb | |
parent | 44b50c9d21c7baef63f0f3682ff4e657bd533898 (diff) | |
download | FreeBSD-src-423f808042c2237d4bdd7f71355eb4cf487bbd8d.zip FreeBSD-src-423f808042c2237d4bdd7f71355eb4cf487bbd8d.tar.gz |
Print "(null)" instead of crashing for null strings. Null names are
often generated for stack traces. Now inspection of unmapped addresses
no longer panics the system.
Diffstat (limited to 'sys/ddb')
-rw-r--r-- | sys/ddb/db_output.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c index 5fa5cb8..cc70b63 100644 --- a/sys/ddb/db_output.c +++ b/sys/ddb/db_output.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_output.c,v 1.8 1994/08/27 16:14:09 davidg Exp $ + * $Id: db_output.c,v 1.9 1994/09/27 03:34:54 phk Exp $ */ /* @@ -282,6 +282,8 @@ reswitch: switch (ch = *(u_char *)fmt++) { break; case 's': p = va_arg(ap, char *); + if (p == NULL) + p = "(null)"; width -= strlen (p); if (!ladjust && width > 0) while (width--) |