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

Coverity 1352893 Buffer not null terminated

    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/readonly/readonly.c:

      210        memset(buf, 0, sizeof(buf));
      211        /*
      212         * Set up all the directory names.
      213         */
      214        testutil_work_dir_from_path(home, 512, working_dir);
         	
      CID 1352893 (#1 of 3): Buffer not null terminated (BUFFER_SIZE_WARNING)
      17. buffer_size_warning: Calling strncpy with a maximum size argument of 512 bytes on destination array home_wr of size 512 bytes might leave the destination string unterminated.
      215        strncpy(home_wr, home, HOME_SIZE);
      216        strcat(home_wr, ".WRNOLOCK");
         	CID 1352893 (#2 of 3): Buffer not null terminated (BUFFER_SIZE_WARNING) [select issue]
      217        strncpy(home_rd, home, HOME_SIZE);
      218        strcat(home_rd, ".RD");
         	CID 1352893 (#3 of 3): Buffer not null terminated (BUFFER_SIZE_WARNING) [select issue]
      219        strncpy(home_rd2, home, HOME_SIZE);
      220        strcat(home_rd2, ".RDNOLOCK");
      

        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: