Skip to content

reflect: preserve oneof members on decode errors#303

Open
fallintoplace wants to merge 1 commit into
anthropics:mainfrom
fallintoplace:agent/preserve-oneof-on-decode-error
Open

reflect: preserve oneof members on decode errors#303
fallintoplace wants to merge 1 commit into
anthropics:mainfrom
fallintoplace:agent/preserve-oneof-on-decode-error

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What this does

DynamicMessage now decodes a singular oneof replacement into a temporary value before clearing sibling members. If decoding fails, the previously valid oneof member remains set. Existing singular message values are cloned before wire merging as well, so malformed repeated message occurrences do not mutate the stored value.

Coverage

  • truncated replacement varints
  • truncated nested-message payloads
  • mismatched group terminators
  • invalid UTF-8 in a replacement string

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • cargo check --workspace --all-features

@github-actions

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

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