X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fkerberos.c;h=67d6ad9dd45fe75405e42e9153b7fe034b31c0f4;hb=01c38dd6ea7f02cfdc9f77f9299771a4ef6ce968;hp=66825e5a64cc0df076d56b282bd6582ed41c107e;hpb=4bc786f34b50aa301be6f5600f58a980070f481e;p=openldap
diff --git a/servers/slapd/kerberos.c b/servers/slapd/kerberos.c
index 66825e5a64..67d6ad9dd4 100644
--- a/servers/slapd/kerberos.c
+++ b/servers/slapd/kerberos.c
@@ -1,8 +1,17 @@
-/* kerberos.c - ldbm backend kerberos bind routines */
+/* kerberos.c - kerberos bind routines */
/* $OpenLDAP$ */
-/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software .
+ *
+ * Copyright 1998-2006 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * .
*/
#include "portable.h"
@@ -32,7 +41,11 @@ krbv4_ldap_auth(
Debug( LDAP_DEBUG_TRACE, "=> kerberosv4_ldap_auth\n", 0, 0, 0 );
- SAFEMEMCPY( ktxt->dat, cred->bv_val, cred->bv_len );
+ if( cred->len > sizeof(ktxt->dat) ) {
+ return LDAP_OTHER;
+ }
+
+ AC_MEMCPY( ktxt->dat, cred->bv_val, cred->bv_len );
ktxt->length = cred->bv_len;
strcpy( instance, "*" );