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

Coverity analysis defect 151783: Overflowed constant

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • ALL
    • CAR Team 2025-03-17
    • 1

      Overflowed constant

      The overflowed value due to arithmetic on constants is too small or unexpectedly negative, causing incorrect computations. Integer overflow occurs in arithmetic on constant operands
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main_/src/mongo/db/catalog/collection_impl.cpp:558: INTEGER_OVERFLOW 151783 Function "mongo::StringData(this->_ns.coll()).find('.', 0UL)" returns -1.
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main_/src/mongo/db/catalog/collection_impl.cpp:558: INTEGER_OVERFLOW 151783 Expression "mongo::StringData(this->_ns.coll()).find('.', 0UL) + 1UL", which is equal to 0, where "mongo::StringData(this->_ns.coll()).find('.', 0UL)" is known to be equal to 18446744073709551615, overflows the type that receives it, an unsigned integer 64 bits wide.

            Assignee:
            antonio.fuschetto@mongodb.com Antonio Fuschetto
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: