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

Coverity analysis defect 15733: Allocation too small for type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Testing Infrastructure
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: