[21362] Fail when trying to serialize std::string with null characters on its content#245
Merged
MiguelCompany merged 6 commits intomasterfrom Nov 8, 2024
Merged
[21362] Fail when trying to serialize std::string with null characters on its content#245MiguelCompany merged 6 commits intomasterfrom
std::string with null characters on its content#245MiguelCompany merged 6 commits intomasterfrom
Conversation
cc19839 to
c078ee9
Compare
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
c078ee9 to
5a109ef
Compare
Signed-off-by: Miguel Company <[email protected]>
2a1297c to
3debdec
Compare
std::string with null characters on its contentstd::string with null characters on its content
Signed-off-by: Miguel Company <[email protected]>
b857329 to
0790a73
Compare
std::string with null characters on its contentstd::string with null characters on its content
Mario-DL
suggested changes
Nov 8, 2024
Contributor
|
Should be also make the changes when serializing a |
Signed-off-by: Miguel Company <[email protected]> Co-authored-by: Mario Domínguez López <[email protected]>
Member
Author
Not sure, the standard says that for strings, the terminating null character is not transmitted. Not sure if that implies that the string can have null characters in the middle. I'd say we can handle that on a different PR |
Member
Author
|
@Mergifyio backport 2.1.x |
✅ Backports have been createdDetails
|
mergify Bot
pushed a commit
that referenced
this pull request
Nov 8, 2024
…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)
12 tasks
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
versions.mdfile (if applicable).Reviewer Checklist