if ((nextloc + strlen(nextloc)+1 >= contents->dptr + contents->dsize)
|| (retval = krb5_parse_name(nextloc, &mod_princ))) {
krb5_free_principal(princ);
- (void) bzero((char *) entry, sizeof(*entry));
+ (void) memset((char *) entry, 0, sizeof(*entry));
return KRB5_KDB_TRUNCATED_RECORD;
}
entry->mod_name = mod_princ;
if (keysize <= 0) {
krb5_free_principal(princ);
krb5_free_principal(mod_princ);
- (void) bzero((char *) entry, sizeof(*entry));
+ (void) memset((char *) entry, 0, sizeof(*entry));
return KRB5_KDB_TRUNCATED_RECORD;
}
if (!(entry->key.contents = (unsigned char *)malloc(keysize))) {
krb5_free_principal(princ);
krb5_free_principal(mod_princ);
- (void) bzero((char *) entry, sizeof(*entry));
+ (void) memset((char *) entry, 0, sizeof(*entry));
return ENOMEM;
}
(void) memcpy((char *)entry->key.contents, nextloc, keysize);
krb5_free_principal(princ);
krb5_free_principal(mod_princ);
free((char *)entry->key.contents);
- (void) bzero((char *) entry, sizeof(*entry));
+ (void) memset((char *) entry, 0, sizeof(*entry));
return KRB5_KDB_TRUNCATED_RECORD;
}
return 0;
krb5_db_entry *entry;
{
/* erase the key */
- bzero((char *)entry->key.contents, entry->key.length);
+ memset((char *)entry->key.contents, 0, entry->key.length);
free((char *)entry->key.contents);
krb5_free_principal(entry->principal);
krb5_free_principal(entry->mod_name);
- (void) bzero((char *)entry, sizeof(*entry));
+ (void) memset((char *)entry, 0, sizeof(*entry));
return;
}
if (retval = decode_princ_contents(&contents, &entry))
goto cleankey;
found = 1;
- bzero((char *)entry.key.contents, entry.key.length);
+ memset((char *)entry.key.contents, 0, entry.key.length);
if (retval = encode_princ_contents(&contents2, &entry))
goto cleancontents;