Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 6 Jul 2012 12:23:38 +0200
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: Re: KRB4: fix memset in afs_cmu_StringToKey()

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.

Frank

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.