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

Coverity 1352893 Buffer not null terminated

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

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

            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: