From: John Kohl Date: Thu, 8 Nov 1990 15:50:01 +0000 (+0000) Subject: change bcopy to memcpy X-Git-Tag: krb5-1.0-alpha3~156 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c8ff759760688229ad34209dfd55bd17fcb81824;p=krb5.git change bcopy to memcpy git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1436 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/des/cksum.c b/src/lib/crypto/des/cksum.c index 8bf4db224..ae24a917a 100644 --- a/src/lib/crypto/des/cksum.c +++ b/src/lib/crypto/des/cksum.c @@ -68,8 +68,8 @@ mit_des_cbc_cksum(in,out,length,key,iv) t_in_p = (unsigned char *) t_input; #ifdef MUSTALIGN if ((long) ivec & 3) { - bcopy((char *)ivec++,(char *)&t_output[0],sizeof(t_output[0])); - bcopy((char *)ivec,(char *)&t_output[1],sizeof(t_output[1])); + memcpy((char *)&t_output[0],(char *)ivec++,sizeof(t_output[0])); + memcpy((char *)&t_output[1],(char *)ivec,sizeof(t_output[1])); } else #endif @@ -82,8 +82,8 @@ mit_des_cbc_cksum(in,out,length,key,iv) /* get input */ #ifdef MUSTALIGN if ((long) input & 3) { - bcopy((char *)input++,(char *)&t_input[0],sizeof(t_input[0])); - bcopy((char *)input++,(char *)&t_input[1],sizeof(t_input[1])); + memcpy((char *)&t_input[0],(char *)input++,sizeof(t_input[0])); + memcpy((char *)&t_input[1],(char *)input++,sizeof(t_input[1])); } else #endif @@ -120,8 +120,8 @@ mit_des_cbc_cksum(in,out,length,key,iv) /* copy temp output and save it for checksum */ #ifdef MUSTALIGN if ((long) output & 3) { - bcopy((char *)&t_output[0],(char *)output++,sizeof(t_output[0])); - bcopy((char *)&t_output[1],(char *)output,sizeof(t_output[1])); + memcpy((char *)output++,(char *)&t_output[0],sizeof(t_output[0])); + memcpy((char *)output,(char *)&t_output[1],sizeof(t_output[1])); } else #endif diff --git a/src/lib/crypto/des/des.c b/src/lib/crypto/des/des.c index d74d1ed69..ff8b3b9b4 100644 --- a/src/lib/crypto/des/des.c +++ b/src/lib/crypto/des/des.c @@ -114,8 +114,8 @@ mit_des_ecb_encrypt(clear, cipher, schedule, encrypt) } #endif if ((long) clear & 3) { - bcopy((char *)clear++,(char *)&L_save,sizeof(L_save)); - bcopy((char *)clear,(char *)&R_save,sizeof(R_save)); + memcpy((char *)&L_save,(char *)clear++,sizeof(L_save)); + memcpy((char *)&R_save,(char *)clear,sizeof(R_save)); L1 = L_save; R1 = R_save; } @@ -426,8 +426,8 @@ mit_des_ecb_encrypt(clear, cipher, schedule, encrypt) if ((long) cipher & 3) { L_save = L2; /* cant bcopy a reg */ R_save = R2; - bcopy((char *)&L_save,(char *)cipher++,sizeof(L_save)); - bcopy((char *)&R_save,(char *)cipher,sizeof(R_save)); + memcpy((char *)cipher++,(char *)&L_save,sizeof(L_save)); + memcpy((char *)cipher,(char *)&R_save,sizeof(R_save)); } else #endif diff --git a/src/lib/crypto/des/new_rn_key.c b/src/lib/crypto/des/new_rn_key.c index 09266a09e..c7603b7ef 100644 --- a/src/lib/crypto/des/new_rn_key.c +++ b/src/lib/crypto/des/new_rn_key.c @@ -89,7 +89,7 @@ void mit_des_init_random_number_generator(key,p_seed) */ bzero((char *)seed, sizeof(seed)); if (!krb5_os_localaddr(&addrs) && *addrs) { - bcopy((char *)addrs[0]->contents, (char *)seed, + memcpy((char *)seed, (char *)addrs[0]->contents, min(sizeof(seed), addrs[0]->length)); /* XXX may not do all of the seed. */ } @@ -177,7 +177,7 @@ mit_des_set_sequence_number(new_sequence_number, p_seed) mit_des_cblock new_sequence_number; mit_des_random_key_seed *p_seed; { - bcopy((char *)new_sequence_number, (char *)p_seed->sequence_number, + memcpy((char *)p_seed->sequence_number, (char *)new_sequence_number, sizeof(p_seed->sequence_number)); }