From fe0e934776c404190f01fdd0c06b1f72f98cf54f Mon Sep 17 00:00:00 2001 From: John Kohl Date: Thu, 8 Nov 1990 15:23:55 +0000 Subject: [PATCH] use memcmp rather than bcmp git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1429 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/verify_mky.c | 4 ++-- src/lib/krb5/krb/addr_comp.c | 3 ++- src/lib/krb5/krb/rd_safe.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lib/kdb/verify_mky.c b/src/lib/kdb/verify_mky.c index 5767ba10d..616b740a8 100644 --- a/src/lib/kdb/verify_mky.c +++ b/src/lib/kdb/verify_mky.c @@ -60,8 +60,8 @@ krb5_encrypt_block *eblock; (void) krb5_finish_key(eblock); return retval; } - if (bcmp((char *)mkey->contents, (char *)tempkey.contents, - mkey->length)) { + if (memcmp((char *)mkey->contents, (char *)tempkey.contents, + mkey->length)) { retval = KRB5_KDB_BADMASTERKEY; (void) krb5_finish_key(eblock); } else diff --git a/src/lib/krb5/krb/addr_comp.c b/src/lib/krb5/krb/addr_comp.c index 20531ac68..3b36ca798 100644 --- a/src/lib/krb5/krb/addr_comp.c +++ b/src/lib/krb5/krb/addr_comp.c @@ -32,7 +32,8 @@ const krb5_address *addr2; if (addr1->length != addr2->length) return(FALSE); - if (bcmp((char *)addr1->contents, (char *)addr2->contents, addr1->length)) + if (memcmp((char *)addr1->contents, (char *)addr2->contents, + addr1->length)) return FALSE; else return TRUE; diff --git a/src/lib/krb5/krb/rd_safe.c b/src/lib/krb5/krb/rd_safe.c index 158ce0077..af6addeef 100644 --- a/src/lib/krb5/krb/rd_safe.c +++ b/src/lib/krb5/krb/rd_safe.c @@ -150,8 +150,8 @@ krb5_data *outbuf; if (our_cksum.length != his_cksum->length || - bcmp((char *)our_cksum.contents, (char *)his_cksum->contents, - our_cksum.length)) { + memcmp((char *)our_cksum.contents, (char *)his_cksum->contents, + our_cksum.length)) { cleanup(); return KRB5KRB_AP_ERR_MODIFIED; } -- 2.26.2