RobotecAI / ros2cs

A C# (.Net) implementation of ros2 client library (rcl), enabling communication between ros2 ecosystem and C#/.Net applications such as Unity3D
Apache License 2.0
89 stars 22 forks source link

Reading an empty basic type array crashes #41

Closed adamdbrw closed 1 year ago

adamdbrw commented 1 year ago

When reading data from NestedTypes of BasicTypes (for example, a float64 array such as in sensor_msgs/msg/joint_state), ros2cs crashes while reading the data.

This is due to a lack of check for a zero sized array before passing it to Marshal.Copy.