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

Coverity analysis defect 86187: Improper use of negative value

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

      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@mongodb.com Spencer Jackson
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: