Coverity analysis defect 86187: Improper use of negative value

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.3.3
    • Affects Version/s: None
    • Component/s: Security
    • None
    • Fully Compatible
    • ALL
    • Security 11 (03/11/16)
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

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

      Defect 86187 (STATIC_C)
      Checker NEGATIVE_RETURNS (subcategory none)
      File: /src/mongo/db/modules/enterprise/src/ldap/name_mapping/rewrite_rule.cpp
      Function mongo::RewriteRule::_extractMatches(const pcrecpp::RE &, mongo::StringData) const
      /src/mongo/db/modules/enterprise/src/ldap/name_mapping/rewrite_rule.cpp, line: 20
      Assigning: unsigned variable "numCaptureGroups" = "NumberOfCapturingGroups".

              size_t numCaptureGroups = match.NumberOfCapturingGroups();
      

              Assignee:
              Spencer Jackson
              Reporter:
              Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: