Skip to content

Reject unterminated CDR strings during deserialization - #336

Open
Daniiiil1 wants to merge 1 commit into
eProsima:masterfrom
Daniiiil1:codex/reject-unterminated-cdr-strings
Open

Reject unterminated CDR strings during deserialization#336
Daniiiil1 wants to merge 1 commit into
eProsima:masterfrom
Daniiiil1:codex/reject-unterminated-cdr-strings

Conversation

@Daniiiil1

Copy link
Copy Markdown

Summary

  • validate the mandatory trailing null byte before accepting a non-empty CDR string
  • cover both Cdr and FastCdr, for std::string and C-string deserialization
  • restore the deserializer state and throw BadParamException for malformed input
  • correct an existing malformed XCDRv1 map fixture exposed by strict validation

Testing

  • 2,129/2,129 functional tests passed with ctest --test-dir build-verify -E "^cmake\.force_standard\." --output-on-failure
  • added four regression tests covering both deserializers and both string APIs

Fixes #331

Signed-off-by: Daniil Mordanov <153565951+Daniiiil1@users.noreply.github.com>
@Daniiiil1
Daniiiil1 force-pushed the codex/reject-unterminated-cdr-strings branch from c16281f to 7cd2861 Compare August 10, 2026 09:08
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.

Fast-CDR deserialization does not validate null terminator at end of CDR string

1 participant