Date: Mon, 10 Dec 2012 13:14:58 +0530 From: Dhiru Kholia <dhiru.kholia@...il.com> To: john-dev@...ts.openwall.com Subject: Re: fixing the valid() methods 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). -- Cheers, Dhiru
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.