Skip to content

BIP375: validate PSBT_OUT_SP_V0_LABEL length - #2286

Open
wangjingshuiku wants to merge 1 commit into
bitcoin:masterfrom
wangjingshuiku:master
Open

wangjingshuiku wants to merge 1 commit into
bitcoin:masterfrom
wangjingshuiku:master

Conversation

@wangjingshuiku

Copy link
Copy Markdown

This PR updates the BIP-375 reference validator to enforce the serialized length of PSBT_OUT_SP_V0_LABEL.

BIP-375 defines the field value as a 32-bit little-endian unsigned integer, so PSBT_OUT_SP_V0_LABEL must contain exactly 4 bytes. Previously, the validator only checked that PSBT_OUT_SP_V0_LABEL requires PSBT_OUT_SP_V0_INFO, allowing malformed values such as a one-byte label when valid SP_V0_INFO was present.

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