Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 10 Dec 2012 20:25:51 +0100
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: fixing the valid() methods

On 10 Dec, 2012, at 8:44 , Dhiru Kholia <dhiru.kholia@...il.com> wrote:
> On Mon, Dec 10, 2012 at 1:02 PM, Solar Designer <solar@...nwall.com> wrote:
>> On Mon, Dec 10, 2012 at 12:55:40PM +0530, Dhiru Kholia wrote:
>>> The first line of valid involves a strdup call.
>> 
>> That's a problem.  You should do the strncmp() first, and only if it
>> returns a match proceed to allocate memory.  (Better yet, you should
>> not be allocating any memory there at all.)
> 
> I have committed a patch to fix this. I am still allocating memory
> though (but later on).


That's OK now.

BTW I fixe krb5pa-sha1's valid() by just copying it verbatim from my opencl format. It's not very impressive code but it doesn't allocate any memory and it seems to be solid.

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.