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 <>
Subject: Re: fixing the valid() methods

On 10 Dec, 2012, at 8:44 , Dhiru Kholia <> wrote:
> On Mon, Dec 10, 2012 at 1:02 PM, Solar Designer <> 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.


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.