xfree(tmpad);
return ENOMEM;
}
- bcopy((char *)inad->contents, (char *)tmpad->contents, inad->length);
+ memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
*outad = tmpad;
return 0;
}
xfree(tmpad);
return ENOMEM;
}
- bcopy((char *)inad->contents, (char *)tmpad->contents, inad->length);
+ memcpy((char *)tmpad->contents, (char *)inad->contents, inad->length);
*outad = tmpad;
return 0;
}
free((char *)tempdata);
return ENOMEM;
}
- bcopy((char *)indata->data, (char *)tempdata->data, tempdata->length);
+ memcpy((char *)tempdata->data, (char *)indata->data, tempdata->length);
*outdata = tempdata;
return 0;
}
to->contents = (krb5_octet *)malloc(to->length);
if (!to->contents)
return ENOMEM;
- bcopy((char *)from->contents, (char *)to->contents, to->length);
+ memcpy((char *)to->contents, (char *)from->contents, to->length);
return 0;
}
if (retval = encode_krb5_enc_priv_part(&privmsg_enc_part, &scratch))
return retval;
-#define cleanup_scratch() { (void) bzero(scratch->data, scratch->length); krb5_free_data(scratch); }
+#define cleanup_scratch() { (void) memset(scratch->data, 0, scratch->length); krb5_free_data(scratch); }
/* put together an eblock for this encryption */
xfree(scratch);
return ENOMEM;
}
- bzero(scratch->data + scratch->length,
+ memset(scratch->data + scratch->length, 0,
privmsg.enc_part.ciphertext.length - scratch->length);
if (!(privmsg.enc_part.ciphertext.data =
malloc(privmsg.enc_part.ciphertext.length))) {
}
#define cleanup_encpart() {\
-(void) bzero(privmsg.enc_part.ciphertext.data, \
+(void) memset(privmsg.enc_part.ciphertext.data, 0, \
privmsg.enc_part.ciphertext.length); \
free(privmsg.enc_part.ciphertext.data); \
privmsg.enc_part.ciphertext.length = 0; privmsg.enc_part.ciphertext.data = 0;}
goto clean_prockey;
}
+
/* put last block into the i_vector */
if (i_vector)
- bcopy(privmsg.enc_part.ciphertext.data +
- (privmsg.enc_part.ciphertext.length -
- eblock.crypto_entry->block_length),
- i_vector,
- eblock.crypto_entry->block_length);
+ memcpy(i_vector,
+ privmsg.enc_part.ciphertext.data +
+ (privmsg.enc_part.ciphertext.length -
+ eblock.crypto_entry->block_length),
+ eblock.crypto_entry->block_length);
/* private message is now assembled-- do some cleanup */
cleanup_scratch();
return ENOMEM;
}
-#define cleanup_scratch() {(void)bzero(scratch.data, scratch.length); (void)xfree(scratch.data);}
+#define cleanup_scratch() {(void)memset(scratch.data, 0, scratch.length); (void)xfree(scratch.data);}
/* do any necessary key pre-processing */
if (retval = krb5_process_key(&eblock, key)) {
input */
/* put last block into the i_vector */
if (i_vector)
- bcopy(privmsg->enc_part.ciphertext.data +
- (privmsg->enc_part.ciphertext.length -
- eblock.crypto_entry->block_length),
- i_vector,
- eblock.crypto_entry->block_length);
+ memcpy(i_vector,
+ privmsg->enc_part.ciphertext.data +
+ (privmsg->enc_part.ciphertext.length -
+ eblock.crypto_entry->block_length),
+ eblock.crypto_entry->block_length);
/* private message is now decrypted -- do some cleanup */
}
cleanup_scratch();
-#define cleanup_data() {(void)bzero(privmsg_enc_part->user_data.data,privmsg_enc_part->user_data.length); (void)xfree(privmsg_enc_part->user_data.data);}
+#define cleanup_data() {(void)memset(privmsg_enc_part->user_data.data,0,privmsg_enc_part->user_data.length); (void)xfree(privmsg_enc_part->user_data.data);}
#define cleanup_mesg() {(void)xfree(privmsg_enc_part);}
if (retval = krb5_timeofday(¤ttime)) {