Coverity analysis defect 127652: Uninitialized pointer field

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • ALL
    • Execution Team 2022-09-05
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Yuhong Zhang
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: