roscpp_core icon indicating copy to clipboard operation
roscpp_core copied to clipboard

serialization of service response message when response was failed

Open canalteks opened this issue 4 years ago • 0 comments

Dear developers,

we suspect that ros::serialization::serializeServiceResponse had a bug to assign unused memory unsafely.

when service response returned false (argument "ok" == false), else statement assigned (sizeof(message) + 1) bytes. the following codes in the else-statement, serializatio of "ok" flag will be safe, but unfortunately, the next serialization of message should be unsafe because lack of message size information before that data.

if roscpp sent a message data in the else-statement, we thought that it's neccesary to serialize size of message like in "if-true-statement". if not, we thought it's better to set m.num_bytes to "1" and remove this sentence.

we hope it could be a help.

canalteks avatar Sep 06 '21 01:09 canalteks