ros-perception / image_common

Common code for working with images in ROS
http://www.ros.org/wiki/image_common
125 stars 220 forks source link

Fix invalid memory read/write in getCameraInfoTopic() for empty base_topic #148

Closed rhaschke closed 8 months ago

rhaschke commented 4 years ago

When passing an empty string to getCameraInfoTopic(), boost's split() was returning an empty vector. However, the last element of this vector was accessed w/o protection and even overwritten, causing arbitrary memory corruption.

The new implementation is more efficient, just searching for the last slash and replacing everything thereafter with "camera_info".

rhaschke commented 3 years ago

Closing and reopening to re-trigger CI.

rhaschke commented 3 years ago

Ping @jack-oquin: Just noticed that this simple fix is still waiting to be merged :wink:

ahcorde commented 8 months ago

This PR is targeting hydro which is EOL, feel free to open this PR in noetic if the issue still exists