|
Message-ID: <066481453db0a325adc9eaee6af007c4@smtp.hushmail.com> Date: Fri, 06 Jul 2012 12:17:50 +0200 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: KRB4: fix memset in afs_cmu_StringToKey() On 2012-07-06 12:09, Frank Dittrich wrote: > On 07/06/2012 11:56 AM, magnum wrote: >> On 2012-07-06 10:02, Frank Dittrich wrote: >>> clang 3.0 correctly identified a problem here and issued a warning >>> [-Wsizeof-pointer-memaccess] >>> >>> On linux-x86 (32bit), sizeof(key) is just 4, while sizeof(*key) is 8. >>> >>> Attached patch fixes the problem. >> >> Are you sure about this? How about sizeof(DES_cblock), what size is that? > > Quite sure, sizeof(DES_cblock) is 8. > On 64bit, sizeof(key) == sizeof(*key) == sizeof(DES_cblock) == 8. > > Do you prefer sizeof(DES_cblock) instead of sizeof(*key)? > I think that's harder to read. I prefer that a lot. It shows you know what you are doing. sizeof(*key) looks like a bug to me, just as much as sizeof(key). magnum
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.