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

[AIST-QA] Fix potential use of uninitialized variable in moveit_ros. #1818

Conversation

max-krichenbauer
Copy link
Contributor

@max-krichenbauer max-krichenbauer commented Dec 26, 2019

Description

The local variable value is not initialized and stored in std::map <std::string, double> v[joint] regardless of whether maker equals "=" or not. For that reason, it may cause undefined behavior if marker is "=" and value is not set via input stream.
This fix extends the scope of the conditional branch of marker: value is stored v[joint] only when marker equals "=".

This contribution is made by AIST ( https://www.aist.go.jp ) based on static code analysis with klocwork (Perforce Software).

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

@davetcoleman
Copy link
Member

@tylerjw what happened to the CodeCov automatic reports? Is that tool broken right now?

Copy link
Member

@davetcoleman davetcoleman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

@davetcoleman davetcoleman merged commit 7c3e67f into moveit:melodic-devel Dec 31, 2019
davetcoleman pushed a commit that referenced this pull request Dec 31, 2019
@davetcoleman
Copy link
Member

Cherry picked to master

@tylerjw
Copy link
Member

tylerjw commented Dec 31, 2019

@davetcoleman Looks like the aren't being run if you look at the travis run for this one.

@rhaschke
Copy link
Contributor

rhaschke commented Jan 1, 2020

We have codecov enabled for the master branch only.

@max-krichenbauer max-krichenbauer deleted the feature/analysis_tool/melodic/Uninitialize_variable/moveit_ros branch January 6, 2020 05:09
sjahr added a commit to sjahr/moveit that referenced this pull request Jun 21, 2024
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.

None yet

5 participants