Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Untested line in nsec3digests/SHA1NSEC3Digest.sol:14 #160

Open
Arachnid opened this issue Apr 16, 2021 · 1 comment
Open

Untested line in nsec3digests/SHA1NSEC3Digest.sol:14 #160

Arachnid opened this issue Apr 16, 2021 · 1 comment

Comments

@Arachnid
Copy link
Member

Mutation:
    File: nsec3digests/SHA1NSEC3Digest.sol
    Line nr: 14
    Result: Lived
    Original line:
                 buf.init(salt.length + data.length + 16);

    Mutated line:
                 buf.init(salt.length + data.length - 16);
@makoto
Copy link
Member

makoto commented Apr 26, 2021

    function hash(bytes calldata salt, bytes calldata data, uint iterations) external override pure returns (bytes32) {
        Buffer.buffer memory buf;
        buf.init(salt.length + data.length + 16);

When A - B returns negative it returns big number and still passes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants