Skip to content

[AUD-026] [INFO] Lone dash mapping to ParseEmptyDecimalString is undocumented #96

Description

@thedavidmeister

Whole-repo audit 2026-08-24 at commit 3e76bab (audit skill 0.35.0). Pass 2 status: ledgered (audit/mutation-test-scans.json, scan of 2026-08-24T08:55:39Z at 35496d8).

src/lib/parse/LibParseDecimal.sol:125-134

unsafeDecimalStringToSignedInt's doc does not state that a region consisting only of "-" returns ParseEmptyDecimalString: the sign is consumed, the remaining region is empty, so a non-empty input maps to the "empty" selector. Derivable by composing the two docs, but surprising enough at the contract boundary to state.

Proposed fix

Add to the @notice in src/lib/parse/LibParseDecimal.sol after line 130:

    /// A region holding only a negative sign has no digits after the sign, so
    /// it reports `ParseEmptyDecimalString`.

Metadata

Metadata

Labels

auditAudit findinginfoAudit findingpass3Audit finding

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions