Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120716073116.GC20766@openwall.com>
Date: Mon, 16 Jul 2012 11:31:16 +0400
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: Another CVS core bug: Does not load bare hashes

magnum, Jim -

On Sun, Jul 15, 2012 at 09:11:01PM +0200, magnum wrote:
> On 2012-07-15 16:14, jfoug wrote:
> > Now, the net*lm* formats are working fine.  However, Alex made this
> > change, and I am not sure why, so I will not propose cutting out
> > these lines, UNTIL he can explain why the change was made.  Prior
> > code always filled all 10 items.  Some formats require more than the
> > first 4
> 
> Thanks! This is obvious once looking around these lines. This is a
> memory saver I suppose.

No, it was to speed up the loader (don't parse the entire line when
we're only interested in the first few fields).  I naively thought that
this would be obvious when merging and that you'd drop this piece
(parsing all fields unconditionally), like I think Jim did before.
Older core code had an equivalent optimization, it was just written
differently.

Perhaps I should have written a comment on that.  In fact, perhaps
adding a comment now would not hurt.

> I did this:
> 
> diff --git a/src/loader.c b/src/loader.c
> index db1bca3..a7f94c5 100644
> --- a/src/loader.c
> +++ b/src/loader.c
> @@ -259,6 +259,9 @@ static int ldr_split_line(char **login, char
> **ciphertext,
>         } else {
>                 for (i = 2; i < 4; i++)
>                         fields[i] = ldr_get_field(&line,
> options->field_sep_char);
> +               // Next line needed for l0phtcrack (in Jumbo)
> +               for (; i < 6; i++)
> +                       fields[i] = ldr_get_field(&line,
> options->field_sep_char);
>                 for (; i < 10; i++)
>                         fields[i] = "/";
>         }

I'm OK with this.

Thanks,

Alexander

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.