Skip to content

Commit

Permalink
Refs #22343: Add sanity check when accessing participant proxy data
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <[email protected]>
  • Loading branch information
Mario-DL committed Nov 28, 2024
1 parent 48a8776 commit fc3a9e9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,15 @@ void PDPClient::announceParticipantState(
if (getRTPSParticipant()->is_secure())
{
// Need the mangled guid prefix in this case
srv_guid_prefix = get_participant_proxy_data(svr.guidPrefix)->m_guid.guidPrefix;
auto pdata = get_participant_proxy_data(svr.guidPrefix);
if (nullptr != pdata)
{
srv_guid_prefix = pdata->m_guid.guidPrefix;
}
else
{
continue;
}
}
#endif // HAVE_SECURITY
locators.push_back(svr.metatrafficUnicastLocatorList);
Expand Down

0 comments on commit fc3a9e9

Please sign in to comment.