summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/gssapi/mechs
diff options
context:
space:
mode:
authorbugbomb <none@none>2005-06-29 18:11:18 -0700
committerbugbomb <none@none>2005-06-29 18:11:18 -0700
commit6cf54e3429e9e407238b294191931f62ddfa1aa9 (patch)
treefa828092ed7410e9077c77c0aff5db3fdc05dcc7 /usr/src/uts/common/gssapi/mechs
parent35b145352923828ff6a30fd0dcc8fb5e2ffef483 (diff)
downloadillumos-joyent-6cf54e3429e9e407238b294191931f62ddfa1aa9.tar.gz
6261685 Security : buffer overflow, heap corruption in KDC
Diffstat (limited to 'usr/src/uts/common/gssapi/mechs')
-rw-r--r--usr/src/uts/common/gssapi/mechs/krb5/krb5/krb/unparse.c6
1 files changed, 4 insertions, 2 deletions
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.