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

Coverity analysis defect 153640: Overflowed constant

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Server Security
    • Fully Compatible
    • ALL
    • Security 2025-03-17

      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/util/secure_compare_memory.cpp:38: INTEGER_OVERFLOW 153640 "ret" = "0U", its value is now 0.
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main_/src/mongo/util/secure_compare_memory.cpp:44: INTEGER_OVERFLOW 153640 Expression "ret - 1U", which is equal to 4294967295, where "ret" is known to be equal to 0, underflows the type that receives it, an unsigned integer 32 bits wide.

            Assignee:
            gabriel.marks@mongodb.com Gabriel Marks
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: