Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BLU0-SMTP1541D7D7DB73B83E19C959BFDCB0@phx.gbl>
Date: Thu, 2 Jan 2014 03:12:25 +0100
From: Frank Dittrich <frank_dittrich@...mail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Strange errors with dynamic formats > dynamic_4999

On 01/02/2014 03:00 AM, magnum wrote:
> On 2014-01-02 02:51, Frank Dittrich wrote:
>> Apparently, dynamic formats with numbers >= 5000 will be ignored by
>> almost any command unless specified directly.
>> The only exception is --list=subformats (or the obsolete
>> --subformat=LIST).
> 
> This seems to be by design so I'll leave it to Jim.
> 
> $ git grep -nA3 '\b5000\b' dynamic_fmt.c
> dynamic_fmt.c:7369:     for (count = i = 0; i < 5000; ++i) {
> dynamic_fmt.c-7370-             if (dynamic_IS_VALID(i) == 1)
> dynamic_fmt.c-7371-                     ++count;
> dynamic_fmt.c-7372-     }
> dynamic_fmt.c:7375:     for (idx = i = 0; i < 5000; ++i) {
> dynamic_fmt.c-7376-             if (dynamic_IS_VALID(i) == 1) {
> dynamic_fmt.c-7377-                     if (LoadOneFormat(i,
> &pFmts[idx]) == 0)
> dynamic_fmt.c-7378-                             --count;

May be it's a good idea to reserve numbers >= 5000 for future use.

But then, there should be one place where this limit is defined, e.g., a
macro definition.
This macro definition should then be re-used in --list=subformats.
And the limit should be documented somewhere.

Then we have a hidden feature, not a bug.
(But unless bash completion suppresses those names, the feature is not
that hidden.)

I tested which numbers work because I wanted to suggest that we
encourage users to use numbers between 9000 and 9999, unless they intend
to publish their code and integrate it into jumbo.

May be we should suggest the range from 4000 to 4999 instead?
1000 individual dynamic formats seem to be enough for everyone.
Or should we just encourage people to publish their format definitions?

Frank

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.