Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-11541

Coverity analysis defect 15733: Allocation too small for type

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • Labels:
    • Fully Compatible
    • ALL

      A new defect has been detected and assigned to matt.kangas@10gen.com in Coverity Connect http://coverity.mongodb.com//sourcebrowser.htm?projectId=10001#mergedDefectId=15733
      The defect was flagged by checker SIZECHECK in
      file /src/mongo/db/exec/2d.cpp
      function mongo::TwoD::work(long *)
      and this ticket was created by matt.kangas@10gen.com

      It's complaining about line 68 in 2d.cpp
      https://github.com/mongodb/mongo/blame/master/src/mongo/db/exec/2d.cpp#L66-L70

       _am = static_cast<TwoDAccessMethod*>( collection->getIndexCatalog()->getIndex( _descriptor ) );
      

      CID 15733 (#3-2 of 3): Allocation too small for type (SIZECHECK)10. size_error: Allocating 72 bytes to pointer of type mongo::TwoDAccessMethod, which needs at least 112 bytes.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            auto auto
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: