-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[21362] Fail when trying to serialize std::string
with null characters on its content
#245
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
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]>
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@Mergifyio backport 2.1.x |
✅ Backports have been created
|
…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)
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.md
file (if applicable).Reviewer Checklist