Skip to content

Bug in adapter count detection #38

@jchorl

Description

@jchorl

Hi! Thanks for the great tool.

I suspect there is a bug here:

fastplong/src/evaluator.cpp

Lines 296 to 297 in 13da873

int curBase = ( val >> ((keylen -s)*2) ) & 0x03;
int lastBase = ( val >> ((keylen -s - 1)*2) ) & 0x03;

val in this case seems to be a count, as it is assigned to the topCount here:

topCount = val;

However, it doesn't really make sense to bit-shift a count. Furthermore, we can see in the git blame 7f52a77 that this check used to iterate over the sequence but now seems to iterate the count.

I'm not sure if it's as easy as replacing val with k or if we have to get fancier and leverage extendKeyToAdapter.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions