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

Coverity 1353015, 1353016, out-of-bounds access

    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

      util_dump.c:

      391         */
         	3. Condition (char const *)uri[0] == (char const *)"table:"[0], taking true branch
         	4. Condition strncmp(uri, "table:", strlen("table:")) == 0, taking true branch
      392        if (WT_PREFIX_MATCH(uri, "table:")) {
         	5. strlen_assign: Setting variable len to a value computed using function strlen.
      393                len = strlen(uri) + strlen("colgroup:");
         	
      CID 1353016 (#1 of 1): Out-of-bounds access (OVERRUN)
      6. alloc_strlen: Allocating insufficient memory for the terminating null of the string.
         	7. Condition (p = malloc(len)) == NULL, taking false branch
      394                if ((p = malloc(len)) == NULL)
      395                        return (util_err(session, errno, NULL));
      

      495         */
      496        complex_table = false;
         	5. Condition (char const *)uri[0] == (char const *)"table:"[0], taking true branch
         	6. Condition strncmp(uri, "table:", strlen("table:")) == 0, taking true branch
      497        if (WT_PREFIX_MATCH(uri, "table:")) {
         	7. strlen_assign: Setting variable len to a value computed using function strlen.
      498                len = strlen(uri) + strlen("colgroup:");
         	
      CID 1353015 (#1 of 1): Out-of-bounds access (OVERRUN)
      8. alloc_strlen: Allocating insufficient memory for the terminating null of the string.
         	9. Condition (p = malloc(len)) == NULL, taking false branch
      499                if ((p = malloc(len)) == NULL)
      500                        return (util_err(session, errno, NULL));
      

        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: