]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Don't use sizeof(pointertype) to get the length of an allocated array
authorTom Yu <tlyu@mit.edu>
Thu, 10 Dec 2009 19:34:47 +0000 (19:34 +0000)
committerTom Yu <tlyu@mit.edu>
Thu, 10 Dec 2009 19:34:47 +0000 (19:34 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23464 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/krb/checksum/confounder.c

index e8c6bd9c4f82e89d37641410b575887c06097a82..6429a195f3359365d9b71d355f2e903e5cf55d0e 100644 (file)
@@ -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. */