svn rev #23464: trunk/src/lib/crypto/krb/checksum/

tlyu@MIT.EDU tlyu at MIT.EDU
Thu Dec 10 14:34:47 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=23464
Commit By: tlyu
Log Message:
Don't use sizeof(pointertype) to get the length of an allocated array.


Changed Files:
U   trunk/src/lib/crypto/krb/checksum/confounder.c
Modified: trunk/src/lib/crypto/krb/checksum/confounder.c
===================================================================
--- trunk/src/lib/crypto/krb/checksum/confounder.c	2009-12-10 19:04:47 UTC (rev 23463)
+++ trunk/src/lib/crypto/krb/checksum/confounder.c	2009-12-10 19:34:47 UTC (rev 23464)
@@ -45,7 +45,7 @@
     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. */




More information about the cvs-krb5 mailing list