summaryrefslogtreecommitdiff
path: root/usr/src/tools/ctf/cvt/tdata.c
diff options
context:
space:
mode:
authorJohn Levon <john.levon@sun.com>2010-01-05 06:57:53 -0800
committerJohn Levon <john.levon@sun.com>2010-01-05 06:57:53 -0800
commita5506aa676fbabe11c63a45f80c64f795a3624e0 (patch)
tree1da44f8e38a6e69b342be4540ac55d2f8176531c /usr/src/tools/ctf/cvt/tdata.c
parent8c629652ef2aba4749bf59757802cf9a4f1a7571 (diff)
downloadillumos-joyent-a5506aa676fbabe11c63a45f80c64f795a3624e0.tar.gz
6905711 anonymous and empty SOUs crash ctfconvert
Diffstat (limited to 'usr/src/tools/ctf/cvt/tdata.c')
-rw-r--r--usr/src/tools/ctf/cvt/tdata.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr/src/tools/ctf/cvt/tdata.c b/usr/src/tools/ctf/cvt/tdata.c
index 32d84829d7..295928586e 100644
--- a/usr/src/tools/ctf/cvt/tdata.c
+++ b/usr/src/tools/ctf/cvt/tdata.c
@@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Routines for manipulating tdesc and tdata structures
*/
@@ -86,9 +84,10 @@ tdesc_layouthash(int nbuckets, void *node)
* Unnamed structures, which cannot have forward
* declarations pointing to them. We can therefore
* incorporate the name of the first member into
- * the hash value.
+ * the hash value, assuming there are any.
*/
- name = tdp->t_members->ml_name;
+ if (tdp->t_members != NULL)
+ name = tdp->t_members->ml_name;
break;
case ENUM:
/* Use the first element in the hash value */