SICKAG / sick_safetyscanners2

ROS2 driver for SICK safety laser scanners
https://www.sick.com/de/en/opto-electronic-protective-devices/safety-laser-scanners/c/g187225
Apache License 2.0
28 stars 30 forks source link

Unsafe pointer access in UDP Callback #15

Closed guilyx closed 2 years ago

guilyx commented 2 years ago

Description

m_msg_creator variable was initialized after UDP callback function was established so whenever a UDP packet came, if it so happened that m_msg_creator was not initialized yet, it would crash because the callback function accesses m_msg_creator

Fix

Results

Removes the often occurring segmentation faults on start up

lenpuc commented 2 years ago

Tested and merged.

Thanks for finding this fix