Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 17 Aug 2015 20:45:44 +0800
From: Kai Zhao <loverszhao@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: auditing our use of FMT_* flags

Hi  Alexander,

On Sun, Aug 16, 2015 at 12:24 AM, Solar Designer <solar@...nwall.com> wrote:
> Kai,
>
> On Sat, Aug 15, 2015 at 10:33:57AM +0800, Kai Zhao wrote:
>> Hope the following patch can solve the two problems.
>>
>> https://github.com/magnumripper/JohnTheRipper/pull/1664/files
>
> This looks mostly OK to me.
>
> BTW, why do you call the error message buffer s_size?  Why that name?
>
> I see there is an s_size in core tree, but it's used like this:
>
> static char *fmt_self_test_body(struct fmt_main *format,
>     void *binary_copy, void *salt_copy)
> {
>         static char s_size[32];
> [...]
>                 for (size = 0; size < PASSWORD_HASH_SIZES; size++)
>                 if (format->methods.binary_hash[size] &&
>                     format->methods.get_hash[size](index) !=
>                     format->methods.binary_hash[size](binary)) {
>                         sprintf(s_size, "get_hash[%d](%d)", size, index);
>                         return s_size;
>                 }
>
> and that's the only use of it.  In your code, this choice of variable
> name makes no sense to me.
>

Could I change the "s_size" to "err_buf" ?


Thanks,

Kai

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.