Skip to content

Bound parser counts before allocation#562

Open
Michae2xl wants to merge 1 commit into
zcash:masterfrom
Michae2xl:fix-parser-count-bounds
Open

Bound parser counts before allocation#562
Michae2xl wants to merge 1 commit into
zcash:masterfrom
Michae2xl:fix-parser-count-bounds

Conversation

@Michae2xl
Copy link
Copy Markdown

Summary

  • reject CompactSize counts or lengths that cannot fit in the remaining parser input before allocating slices
  • cover block transaction counts, block header Equihash solution length, transparent inputs and outputs, Sapling v4/v5 spends and outputs, JoinSplits, and Orchard actions
  • preserve valid parsing behavior while returning earlier errors for malformed or truncated input

Testing

  • GOCACHE=/tmp/zcash-lightwalletd-go-build go test ./parser

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

Successfully merging this pull request may close these issues.

1 participant