We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
...
Found when scanning with Coverity, qos.transport().transport_type does not seem to be initialized, which may cause problems such as crash. When xml_config_file_.length() <= 0U, it will enter create_participant(). https://wiki.sei.cmu.edu/confluence/display/cplusplus/EXP53-CPP.+Do+not+read+uninitialized+memory
qos.transport().transport_type
xml_config_file_.length() <= 0U
create_participant()
bool OnlineLogSubscriber::init(const std::string& xml_config_file) { // CREATE THE PARTICIPANT DomainParticipantQos pqos; pqos.name("Participant_sub"); /* Create DomainParticipant*/ std::string participant_profile_name = "sub_participant_profile"; xml_config_file_ = xml_config_file; // Load XML configuration if (xml_config_file_.length() > 0U) { if (ReturnCode_t::RETCODE_OK != DomainParticipantFactory::get_instance()->get_participant_qos_from_profile( participant_profile_name, pqos)) { return false; } } participant_ = DomainParticipantFactory::get_instance()->create_participant(log_doamin_, pqos);
DomainParticipant* DomainParticipantFactory::create_participant(DomainId_t did, const DomainParticipantQos& qos, DomainParticipantListener* listen, const StatusMask& mask) { ... const DomainParticipantQos& pqos = (&qos == &PARTICIPANT_QOS_DEFAULT) ? default_participant_qos_ : qos; logInfo(PARTICIPANT, "PARTICIPANT_QOS_DEFAULT.transport_type:" << PARTICIPANT_QOS_DEFAULT.transport().transport_type << " default_participant_qos_.transport().transport_type:" << default_participant_qos_.transport().transport_type << " qos.transport().transport_type:" << qos.transport().transport_type << " pqos.transport().transport_type:" << pqos.transport().transport_type << " equal?:" << (&qos == &PARTICIPANT_QOS_DEFAULT));
Ubuntu Focal 20.04 amd64
Default configuration, UDPv4 & SHM
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there an already existing issue for this?
Expected behavior
...
Current behavior
Found when scanning with Coverity,
qos.transport().transport_type
does not seem to be initialized, which may cause problems such as crash. Whenxml_config_file_.length() <= 0U
, it will entercreate_participant()
.https://wiki.sei.cmu.edu/confluence/display/cplusplus/EXP53-CPP.+Do+not+read+uninitialized+memory
Steps to reproduce
...
Fast DDS version/commit
...
Platform/Architecture
Ubuntu Focal 20.04 amd64
Transport layer
Default configuration, UDPv4 & SHM
Additional context
No response
XML configuration file
No response
Relevant log output
No response
Network traffic capture
No response
The text was updated successfully, but these errors were encountered: