From 8cbb7fd93e302a6bed17963c61180bf1856d48a1 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Thu, 8 Nov 1990 15:28:35 +0000 Subject: [PATCH] change bcopy to memcpy git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1431 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/decrypt_key.c | 3 +-- src/lib/kdb/kdb_dbm.c | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/lib/kdb/decrypt_key.c b/src/lib/kdb/decrypt_key.c index 2e466526c..26c42add4 100644 --- a/src/lib/kdb/decrypt_key.c +++ b/src/lib/kdb/decrypt_key.c @@ -47,8 +47,7 @@ krb5_keyblock *out; return ENOMEM; } /* copy out the real length count */ - bcopy((char *)in->contents, (char *)&out->length, - sizeof(out->length)); + memcpy((char *)&out->length, (char *)in->contents, sizeof(out->length)); /* remember the contents of the encrypted version has a sizeof(in->length) integer length of the real embedded key, followed by the diff --git a/src/lib/kdb/kdb_dbm.c b/src/lib/kdb/kdb_dbm.c index a89339b83..5f6621f1e 100644 --- a/src/lib/kdb/kdb_dbm.c +++ b/src/lib/kdb/kdb_dbm.c @@ -440,14 +440,14 @@ krb5_db_entry *entry; contents->dptr = 0; return(ENOMEM); } - (void) bcopy((char *)©_princ, contents->dptr, sizeof(copy_princ)); + (void) memcpy(contents->dptr, (char *)©_princ, sizeof(copy_princ)); nextloc = contents->dptr + sizeof(copy_princ); - (void) bcopy(unparse_princ, nextloc, princ_size); + (void) memcpy(nextloc, unparse_princ, princ_size); nextloc += princ_size; - (void) bcopy(unparse_mod_princ, nextloc, mod_size); + (void) memcpy(nextloc, unparse_mod_princ, mod_size); nextloc += mod_size; - (void) bcopy((char *)entry->key.contents, nextloc, entry->key.length); + (void) memcpy(nextloc, (char *)entry->key.contents, entry->key.length); free(unparse_princ); free(unparse_mod_princ); return 0; @@ -480,7 +480,7 @@ krb5_db_entry *entry; if (nextloc >= contents->dptr + contents->dsize) return KRB5_KDB_TRUNCATED_RECORD; - bcopy(contents->dptr, (char *) entry, sizeof(*entry)); + memcpy((char *) entry, contents->dptr, sizeof(*entry)); if (nextloc + strlen(nextloc)+1 >= contents->dptr + contents->dsize) return KRB5_KDB_TRUNCATED_RECORD; @@ -511,7 +511,7 @@ krb5_db_entry *entry; (void) bzero((char *) entry, sizeof(*entry)); return ENOMEM; } - (void) bcopy(nextloc, (char *)entry->key.contents, keysize); + (void) memcpy((char *)entry->key.contents, nextloc, keysize); if (keysize != entry->key.length) { krb5_free_principal(princ); krb5_free_principal(mod_princ); -- 2.26.2