Coverity analysis defect 170504: Overflowed constant

XMLWordPrintableJSON

    • Storage Execution
    • Fully Compatible
    • ALL
    • v8.0
    • Storage Execution 2025-03-17, Storage Execution 2025-03-31, Storage Execution 2025-04-14
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
      /src/mongo/db/storage/key_string.cpp:2678: INTEGER_OVERFLOW 170504 Expression "remainingBytes - 1U", which is equal to 4294967295, where "remainingBytes" is known to be equal to 0, underflows the type that receives it, an unsigned integer 32 bits wide.

            Assignee:
            Thomas Goyne
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: