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

Coverity #1395811 Time of check time of use

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.0.4, 4.1.4, WT3.2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 1
    • Storage Engines 2018-10-08

      Coverity #1395811 Time of check time of use

      37. Condition (__r = __wt_snprintf(fromfile, 4096UL /* sizeof (fromfile) */, "%s/%s", fromdir, dp->d_name)) != 0, taking true branch.
              testutil_check(__wt_snprintf(fromfile, sizeof(fromfile),
              "%s/%s", fromdir, dp->d_name));
       38. Condition (__r = __wt_snprintf(tofile, 4096UL /* sizeof (tofile) */, "%s/%s", todir, dp->d_name)) != 0, taking true branch.
              testutil_check(__wt_snprintf(tofile, sizeof(tofile),
              "%s/%s", todir, dp->d_name));  	
      CID 1395811 (#1 of 1): Time of check time of use (TOCTOU)
      39. fs_check_call: Calling function stat to perform check on fromfile.
      40. Condition (__r = stat(fromfile, &sb)) != 0, taking true branch.
              testutil_check(stat(fromfile, &sb));
      

            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: