Opened 6 years ago

Last modified 4 years ago

#3445 new defect

Uninitialized pointer in src/lib/dns/rrset.c

Reported by: stephen Owned by:
Priority: very low Milestone: Outstanding Tasks
Component: dhcp Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


Coverity reports an "Unitialized pointer field" in src/lib/dns/ (CID 1202725):

namespace {
422class BasicRdataIterator : public RdataIterator {
CID 1202725 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)2. uninit_member: Non-static class member datavector_ is not initialized in this constructor nor in any functions that it calls.
424    BasicRdataIterator() {}
426    BasicRdataIterator(const std::vector<rdata::ConstRdataPtr>& datavector) :
427        datavector_(&datavector), it_(datavector_->begin())
428    {}

The problem lies in the private default constructor. As the class definition includes a non-default constructor (which would inhibit the creation of a default constructor by the compiler), removing the default constructor would cure the problem. Alternatively, just initialize the datavector_ pointer to NULL.


Change History (3)

comment:1 Changed 6 years ago by tomek

  • Milestone changed from Kea-proposed to Kea1.0

comment:2 Changed 5 years ago by hschempf

  • Milestone changed from Kea1.0 to DHCP Outstanding Tasks
  • Version set to git

Team decision to move to outstanding

comment:3 Changed 4 years ago by tomek

  • Milestone changed from DHCP Outstanding Tasks to Outstanding Tasks

Milestone renamed

Note: See TracTickets for help on using tickets.