osrf / ros2_serial_example

72 stars 16 forks source link

Make sure to zero out the data_buffer when allocating. #53

Closed clalancette closed 5 years ago

clalancette commented 5 years ago

It seems that Fast-CDR doesn't always touch all of the bytes it uses for serializing, which means that we can sometimes touch uninitialized data (as pointed out by valgrind). Make sure to zero out all of the serialized data when we allocate it.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org