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

Check for NULL in XMLElement::Attribute #163

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

artivis
Copy link
Contributor

@artivis artivis commented Aug 19, 2019

Check for NULL pointer returned by tinyxml2::XMLElement::Attribute.
std::string my_string(NULL) is UB.

Fix #160

Signed-off-by: artivis jeremie.deray@canonical.com

  std::string my_string(NULL) is UB
  Fix ros#160

Signed-off-by: artivis <jeremie.deray@canonical.com>
@artivis artivis changed the title Check for NULL pointer Check for NULL in XMLElement::Attribute Aug 19, 2019
@nuclearsandwich nuclearsandwich merged commit dfd49da into ros:melodic-devel Feb 14, 2020
@nuclearsandwich
Copy link
Member

Thanks @artivis for these (#158, #159 as well) contributions.

@artivis artivis deleted the fix/160 branch February 14, 2020 20:03
@nuclearsandwich
Copy link
Member

Also @artivis would you consider porting these null checks to the ros2 branch and adding unit tests for them?

@artivis
Copy link
Contributor Author

artivis commented Feb 20, 2020

Also @artivis would you consider porting these null checks to the ros2 branch and adding unit tests for them?

@nuclearsandwich It is now on my todo list 👍.

artivis added a commit to artivis/pluginlib that referenced this pull request Feb 21, 2020
std::string my_string(NULL) is UB
  Fix ros#160

Signed-off-by: artivis <jeremie.deray@canonical.com>
artivis added a commit to artivis/pluginlib that referenced this pull request Feb 21, 2020
std::string my_string(NULL) is UB
  Fix ros#160

Signed-off-by: artivis <jeremie.deray@canonical.com>
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.

unimplemented null return in class_loader_imp.hpp
2 participants