From 6cf54e3429e9e407238b294191931f62ddfa1aa9 Mon Sep 17 00:00:00 2001 From: bugbomb Date: Wed, 29 Jun 2005 18:11:18 -0700 Subject: 6261685 Security : buffer overflow, heap corruption in KDC --- usr/src/uts/common/gssapi/mechs/krb5/krb5/krb/unparse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr/src/uts/common/gssapi/mechs') diff --git a/usr/src/uts/common/gssapi/mechs/krb5/krb5/krb/unparse.c b/usr/src/uts/common/gssapi/mechs/krb5/krb5/krb/unparse.c index a0c8f59e17..ef6d425982 100644 --- a/usr/src/uts/common/gssapi/mechs/krb5/krb5/krb/unparse.c +++ b/usr/src/uts/common/gssapi/mechs/krb5/krb5/krb/unparse.c @@ -1,5 +1,5 @@ /* - * Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -98,7 +98,9 @@ krb5_unparse_name_ext(context, principal, name, size) totalsize++; totalsize++; /* This is for the separator */ } - + if (nelem == 0 ) + totalsize++; + /* * Allocate space for the ascii string; if space has been * provided, use it, realloc'ing it if necessary. -- cgit v1.2.3