Closed adamlm closed 7 months ago
I think it won't hurt to have this guard. However, this source_id seems required for the SDSM standard. How is it possible that SDSM received have empty field here? Could it be the SDSM being generated itself is not up to standard?
The received SDSM is malformed because the source_id
field does not adhere to the Standard.
I think it won't hurt to have this guard. However, this source_id seems required for the SDSM standard. How is it possible that SDSM received have empty field here? Could it be the SDSM being generated itself is not up to standard?
The received SDSM is malformed because the
source_id
field does not adhere to the Standard.
Ah yeah it does look like the node forgot to set the source_id. Could we make a PR for that?
we are also not setting msgCount, equipmentType, refPosXYConf
PR Details
Description
This PR fixes a segmentation fault during SDSM encoding caused by trying to copy the message's source ID. The
TemporaryID.msg
'sid
field gets implemented as astd::vector<std::uint8_t>
, which is not guaranteed to have any elements. The SDSM encoding function assumes that theSensorDataSharingMessage.msg
'ssource_id
field has 4 elements.This PR adds a size check before copying the data.
Related GitHub Issue
Related Jira Key
Closes CDAR-775
Motivation and Context
Bug fix
How Has This Been Tested?
Manually in integration testing
Types of changes
Checklist: