From: John Kohl Date: Thu, 8 Nov 1990 15:31:33 +0000 (+0000) Subject: change bzero to memset X-Git-Tag: krb5-1.0-alpha3~160 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=41c58ee759dde5adc01dca8a7a07d5f31768e8bc;p=krb5.git change bzero to memset git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1432 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kdb/fetch_mkey.c b/src/lib/kdb/fetch_mkey.c index 0f074258f..fa14564f1 100644 --- a/src/lib/kdb/fetch_mkey.c +++ b/src/lib/kdb/fetch_mkey.c @@ -76,7 +76,7 @@ OLDDECLARG(krb5_keyblock *,key) pwd.data = password; pwd.length = size; retval = krb5_string_to_key(eblock, key->keytype, key, &pwd, mname); - bzero(password, sizeof(password)); /* erase it */ + memset(password, 0, sizeof(password)); /* erase it */ return retval; } else { diff --git a/src/lib/kdb/kdb_dbm.c b/src/lib/kdb/kdb_dbm.c index 5f6621f1e..7499dad01 100644 --- a/src/lib/kdb/kdb_dbm.c +++ b/src/lib/kdb/kdb_dbm.c @@ -493,7 +493,7 @@ krb5_db_entry *entry; 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; @@ -502,13 +502,13 @@ krb5_db_entry *entry; 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); @@ -516,7 +516,7 @@ krb5_db_entry *entry; 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; @@ -527,12 +527,12 @@ free_decode_princ_contents(entry) 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; } @@ -906,7 +906,7 @@ int *nentries; /* how many found & deleted */ 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;