From: Tom Yu Date: Thu, 10 Dec 2009 19:34:47 +0000 (+0000) Subject: Don't use sizeof(pointertype) to get the length of an allocated array X-Git-Tag: krb5-1.8-alpha1~73 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6899a43b722c3cb2672a38eba28490141d9bd32f;p=krb5.git Don't use sizeof(pointertype) to get the length of an allocated array git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23464 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/krb/checksum/confounder.c b/src/lib/crypto/krb/checksum/confounder.c index e8c6bd9c4..6429a195f 100644 --- a/src/lib/crypto/krb/checksum/confounder.c +++ b/src/lib/crypto/krb/checksum/confounder.c @@ -45,7 +45,7 @@ mk_xorkey(krb5_key origkey, krb5_key *xorkey) if (xorbytes == NULL) return ENOMEM; memcpy(xorbytes, origkey->keyblock.contents, origkey->keyblock.length); - for (i = 0; i < sizeof(xorbytes); i++) + for (i = 0; i < origkey->keyblock.length; i++) xorbytes[i] ^= 0xf0; /* Do a shallow copy here. */