-
Notifications
You must be signed in to change notification settings - Fork 1
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
DEV-3809: Fix crash of Decode function. #7
DEV-3809: Fix crash of Decode function. #7
Conversation
|
||
auto xml_parse_doc = xmlParseDoc(reinterpret_cast<const xmlChar *>(payload.c_str())); | ||
if (xml_parse_doc) | ||
std::unique_ptr<xmlDoc, XmlDocDeleter> doc(xml_parse_doc); |
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.
Can't we just return if !xml_parse_doc?
Don't we want to somehow tell the caller about the issue? |
Do you want me to change the return value of Decode to a string or int? |
What does it currently do in a case of an error? |
Depends on the error. There are two options:
|
This crash was not a runtime indication. Just a nullptr dereference. |
done |
No description provided.