diff --git a/include/fastdds/rtps/messages/MessageReceiver.h b/include/fastdds/rtps/messages/MessageReceiver.h index 5ea5daadcbc..91f472e9db2 100644 --- a/include/fastdds/rtps/messages/MessageReceiver.h +++ b/include/fastdds/rtps/messages/MessageReceiver.h @@ -78,7 +78,10 @@ class MessageReceiver std::vector associated_writers_; std::unordered_map> associated_readers_; +#if !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) + //!Pointer to the RTPSParticipantImpl RTPSParticipantImpl* participant_; +#endif // if !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) //!Protocol version of the message ProtocolVersion_t source_version_; //!VendorID that created the message diff --git a/src/cpp/rtps/messages/MessageReceiver.cpp b/src/cpp/rtps/messages/MessageReceiver.cpp index 5439693a071..bed6edcc17c 100644 --- a/src/cpp/rtps/messages/MessageReceiver.cpp +++ b/src/cpp/rtps/messages/MessageReceiver.cpp @@ -48,7 +48,12 @@ namespace rtps { MessageReceiver::MessageReceiver( RTPSParticipantImpl* participant, uint32_t rec_buffer_size) - : participant_(participant) + : mtx_() + , associated_writers_() + , associated_readers_() +#if !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) + , participant_(participant) +#endif // if !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) , source_version_(c_ProtocolVersion) , source_vendor_id_(c_VendorId_Unknown) , source_guid_prefix_(c_GuidPrefix_Unknown)