Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2469

Coverity 1352897: Integer overflowed argument

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.8.0
    • Component/s: None
    • Labels:
      None

      Description

      test/recovery/truncated-log.c

      242        /*
      243         * The offset is the beginning of the last record.  Truncate to
      244         * the middle of that last record (i.e. ahead of that offset).
      245         */
         	18. overflow: Add operation overflows on operands offset and 256UL. Example value for operand: offset = 18446744073709551360.
         	19. overflow_assign: Assigning overflowed or truncated value (or a value computed from an overflowed or a truncated value) to new_offset.
      246        new_offset = offset + V_SIZE;
      247        printf("Parent: Truncate to %u\n", (uint32_t)new_offset);   	
      CID 1352897 (#1 of 1): Integer overflowed argument (INTEGER_OVERFLOW)
      20. overflow_sink: Overflowed or truncated value (or a value computed from an overflowed or truncated value) (wt_off_t)new_offset used as critical argument to function.
      248        if ((ret = truncate(LOG_FILE_1, (wt_off_t)new_offset)) != 0)
      249                testutil_die(errno, "truncate");
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                keith.bostic Keith Bostic
                Reporter:
                keith.bostic Keith Bostic
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: