Skip to content

fix(lazyproto): prevent nil dereference in NestedResult(s) for empty nested messages - #216

Merged
wmorgan6796 merged 2 commits into
CrowdStrike:mainfrom
chris-morgan-moloco:worktree-empty-repeated-fields
Nov 2, 2026
Merged

wmorgan6796 merged 2 commits into
CrowdStrike:mainfrom
chris-morgan-moloco:worktree-empty-repeated-fields

Conversation

@chris-morgan-moloco

Copy link
Copy Markdown
Contributor

A length-delimited field with a zero-byte payload (an empty embedded message) causes decodeWithPool to short-circuit and return (nil, nil). NestedResult and NestedResults dereferenced that result unconditionally, panicking instead of returning a nil DecodeResult.

Fixes #214

chris-morgan-moloco and others added 2 commits September 4, 2026 16:03
…nested messages

A length-delimited field with a zero-byte payload (an empty embedded
message) causes decodeWithPool to short-circuit and return (nil, nil).
NestedResult and NestedResults dereferenced that result unconditionally,
panicking instead of returning a nil DecodeResult.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@wmorgan6796
wmorgan6796 merged commit 231a963 into CrowdStrike:main Nov 2, 2026
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.

Decoding messages with empty nested message fields panics

2 participants