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

Coverity 1352897: Integer overflowed argument

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • WT2.8.0
    • Affects Version/s: None
    • Component/s: None
    • None

      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");
      

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: