Skip to content
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

Crash when receiving raw unicode data #47

Open
fdgStilla opened this issue Sep 11, 2023 · 0 comments
Open

Crash when receiving raw unicode data #47

fdgStilla opened this issue Sep 11, 2023 · 0 comments

Comments

@fdgStilla
Copy link

I'm using anyrpc as a c++ RPC server and xmlrcp as a python client.

When I send a unicode string using xmlrcp, the string is sent with the UTF8 bytes (for exemple "ā" is sent as 0xC4 0x81 (which is -60, -127 in char).

Maybe this is an error from xmlrcp not to convert the UTF8 bytes to escaped xml characters like expected by anyrpc (&#C4&#81 I guess?), but anyway the software shall not crash when receiving this data.

The error is in Reader::IsWhiteSpace, it uses std::isspace which does not support negative signed char, see the official documentation: https://en.cppreference.com/w/cpp/string/byte/isspace

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

No branches or pull requests

1 participant