/* $OpenLDAP$ */
/*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
length = strlen(str);
/* init key array for bits */
- memset(k_char, 0, sizeof(k_char));
+ memset(k_char, '\0', sizeof(k_char));
#ifdef USE_DES_DEBUG
if (des_debug)
(void) des_key_sched(key,key_sked);
(void) des_cbc_cksum((des_cblock *)in_str,key,length,key_sked,key);
/* erase key_sked */
- memset((char *)key_sked, 0, sizeof(key_sked));
+ memset((char *)key_sked, '\0', sizeof(key_sked));
/* now fix up key parity again */
des_fixup_key_parity(key);
int i;
int passlen;
- memset(key, 0, sizeof(des_cblock));
- memset(password, 0, sizeof(password));
+ memset(key, '\0', sizeof(des_cblock));
+ memset(password, '\0', sizeof(password));
strncpy (password, cell, 8);
passlen = strlen (str);
strncat (password, cell, sizeof(password)-passlen);
if ((passlen = strlen(password)) > sizeof(password)) passlen = sizeof(password);
- memcpy(ivec, "kerberos", 8);
- memcpy(temp_key, "kerberos", 8);
+ AC_MEMCPY(ivec, "kerberos", 8);
+ AC_MEMCPY(temp_key, "kerberos", 8);
des_fixup_key_parity (temp_key);
des_key_sched (temp_key, schedule);
des_cbc_cksum (password, ivec, passlen, schedule, ivec);
- memcpy(temp_key, ivec, 8);
+ AC_MEMCPY(temp_key, ivec, 8);
des_fixup_key_parity (temp_key);
des_key_sched (temp_key, schedule);
des_cbc_cksum (password, key, passlen, schedule, ivec);