29 lines
978 B
Plaintext
29 lines
978 B
Plaintext
Index: src/lib/krb5/krb/princ_comp.c
|
|
===================================================================
|
|
--- src/lib/krb5/krb/princ_comp.c.orig
|
|
+++ src/lib/krb5/krb/princ_comp.c
|
|
@@ -33,6 +33,13 @@
|
|
krb5_boolean KRB5_CALLCONV
|
|
krb5_realm_compare(krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)
|
|
{
|
|
+ if ((princ1 == NULL) || (princ2 == NULL))
|
|
+ return FALSE;
|
|
+
|
|
+ if ((krb5_princ_realm(context, princ1) == NULL) ||
|
|
+ (krb5_princ_realm(context, princ2) == NULL))
|
|
+ return FALSE;
|
|
+
|
|
if (krb5_princ_realm(context, princ1)->length !=
|
|
krb5_princ_realm(context, princ2)->length ||
|
|
memcmp (krb5_princ_realm(context, princ1)->data,
|
|
@@ -49,6 +56,9 @@ krb5_principal_compare(krb5_context cont
|
|
register int i;
|
|
krb5_int32 nelem;
|
|
|
|
+ if ((princ1 == NULL) || (princ2 == NULL))
|
|
+ return FALSE;
|
|
+
|
|
nelem = krb5_princ_size(context, princ1);
|
|
if (nelem != krb5_princ_size(context, princ2))
|
|
return FALSE;
|