Skip to content

Conversation

@guelfey
Copy link
Member

@guelfey guelfey commented Dec 19, 2025

This reverts commit 5942541.

Pointer semantics on the caller are actually incorrect here: the
returned depthCounter is passed on to a deeper validation function, but
that shouldn't modify the original depthCounter from the caller. With
pointer semantics, we don't count e.g. the depth of array nesting, but
just how many arrays are present in the signature. For structs this is
especially bad since EnterStruct is called for each struct field, so
this unintentionally limited the number of struct fields that could be
present in a signature to 32.

Fixes #425.

This reverts commit 5942541.

Pointer semantics on the caller are actually incorrect here: the
returned depthCounter is passed on to a deeper validation function, but
that shouldn't modify the original depthCounter from the caller. With
pointer semantics, we don't count e.g. the depth of array nesting, but
just how many arrays are present in the signature. For structs this is
especially bad since EnterStruct is called for each struct field, so
this unintentionally limited the number of struct fields that could be
present in a signature to 32.

Fixes #425.
@guelfey guelfey force-pushed the fix/struct_member_32 branch from a383a19 to 81b5551 Compare December 19, 2025 15:24
@guelfey guelfey merged commit f5f1150 into master Dec 19, 2025
7 checks passed
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.

Breaking change related to depthCounter.structDepth in v5.0.2

2 participants