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

Coverity analysis defect 112121: Improper use of negative value

    • Fully Compatible
    • ALL
    • Query 2019-03-25, Query 2019-04-08

      Negative value can be returned from function is not being checked before being used improperly

      Defect 112121 (STATIC_C)
      Checker NEGATIVE_RETURNS (subcategory none)
      File: /src/mongo/db/pipeline/expression.cpp
      Function mongo::Expression::removeFieldPrefix(const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &)::[lambda() (instance 1)]::operator ()() const
      /src/mongo/db/pipeline/expression.cpp, line: 77
      Function "this->prefixedField->find("", 0UL)" returns a negative number. [Note: The source code implementation of the function has been overridden by a builtin model.]

              uassert(16419,
      

      /src/mongo/db/pipeline/expression.cpp, line: 77
      Assigning: "<temporary>" = "this->prefixedField->find("", 0UL)".

              uassert(16419,
      

            Assignee:
            arun.banala@mongodb.com Arun Banala
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: