Skip to content

[21362] Fail when trying to serialize std::string with null characters on its content (backport #245)#246

Closed
mergify[bot] wants to merge 1 commit into2.1.xfrom
mergify/bp/2.1.x/pr-245
Closed

[21362] Fail when trying to serialize std::string with null characters on its content (backport #245)#246
mergify[bot] wants to merge 1 commit into2.1.xfrom
mergify/bp/2.1.x/pr-245

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented Nov 8, 2024

Description

This addresses #69 and #214 by explicitly failing to serialize a string that contains null characters, instead of silently discard the last part of the string.

@Mergifyio backport 2.1.x 1.0.x
Note: I'm not sure whether we should backport this to 1.x.

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • Any new/modified methods have been properly documented using Doxygen.
  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • Changes are API compatible.
  • N/A New feature has been added to the versions.md file (if applicable).
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: CI pass and failing tests are unrelated with the changes.

This is an automatic backport of pull request #245 done by [Mergify](https://mergify.com).

…ts content (#245)

* Refs #21362. Add test.

Signed-off-by: Miguel Company <[email protected]>

* Refs #21362. Fix Cdr behavior.

Signed-off-by: Miguel Company <[email protected]>

* Refs #21362. Fix FastCDR behavior.

Signed-off-by: Miguel Company <[email protected]>

* Refs #21362. Fix dll export.

Signed-off-by: Miguel Company <[email protected]>

* Refs #21362. Leave implementation in header.

Signed-off-by: Miguel Company <[email protected]>

* Refs #21362. Apply suggestion.

Signed-off-by: Miguel Company <[email protected]>

Co-authored-by: Mario Domínguez López <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Co-authored-by: Mario Domínguez López <[email protected]>
(cherry picked from commit 5cc8c55)
@MiguelCompany
Copy link
Copy Markdown
Member

Closing because 2.1.x is EOL

@MiguelCompany MiguelCompany deleted the mergify/bp/2.1.x/pr-245 branch November 8, 2024 09:25
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