Date: Fri, 06 Jul 2012 12:27:54 +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:23, Frank Dittrich wrote: > On 07/06/2012 12:09 PM, Frank Dittrich wrote: >> On 07/06/2012 11:56 AM, magnum wrote: >>> 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. > > May be the memset is superfluous, because further down the code, there's > a strncpy with length 8. > > The man page says: > If the length of src is less than n, strncpy() pads the remainder of > dest with null bytes. > > So we should instead just remove the memset. That I like! I committed this now and attributed it to you. I removed both memsets. 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.