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

Coverity analysis defect 127652: Uninitialized pointer field

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • ALL
    • Execution Team 2022-09-05

    Description

      Uninitialized pointer field

      The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption. A pointer field is not initialized in the constructor
      /src/mongo/bson/bson_validate.cpp:406: UNINIT_CTOR 127652 Class member declaration for "_currFrame".
      /src/mongo/bson/bson_validate.cpp:188: UNINIT_CTOR 127652 Non-static class member "_currFrame" is not initialized in this constructor nor in any functions that it calls.
      /opt/mongodbtoolchain/revisions/ebe7e16df6d5d79c26469c0020effe50b548fdb6/stow/gcc-v4.1CC/include/c++/11.2.0/array:111: UNINIT_CTOR 127652 Class member declaration for "_M_elems".
      /src/mongo/bson/bson_validate.cpp:188: UNINIT_CTOR 127652 Non-static class member "_frames._M_elems" is not initialized in this constructor nor in any functions that it calls.

      Attachments

        Activity

          People

            yuhong.zhang@mongodb.com Yuhong Zhang
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: