Skip to content

Commit

Permalink
Fix oss-fuzz build (#5122) (#5131)
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit 89720fc)

Co-authored-by: Miguel Company <[email protected]>
  • Loading branch information
mergify[bot] and MiguelCompany authored Aug 19, 2024
1 parent daef938 commit a73d86e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions include/fastdds/rtps/messages/MessageReceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ class MessageReceiver
std::vector<RTPSWriter*> associated_writers_;
std::unordered_map<EntityId_t, std::vector<RTPSReader*>> 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
Expand Down
7 changes: 6 additions & 1 deletion src/cpp/rtps/messages/MessageReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a73d86e

Please sign in to comment.