Mercurial > illumos > git > illumos-omnios
changeset 11432:c1c450bf62f2
6905711 anonymous and empty SOUs crash ctfconvert
author | John Levon <john.levon@sun.com> |
---|---|
date | Tue, 05 Jan 2010 06:57:53 -0800 |
parents | 753a00801df0 |
children | ad26b3d4143e |
files | usr/src/tools/ctf/cvt/tdata.c |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/tools/ctf/cvt/tdata.c Tue Jan 05 08:55:25 2010 -0500 +++ b/usr/src/tools/ctf/cvt/tdata.c Tue Jan 05 06:57:53 2010 -0800 @@ -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 @@ * 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 */