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

Coverity failures: 1356050-1356053

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

      ________________________________________________________________________________________________________
      *** CID 1356053:  Insecure data handling  (TAINTED_SCALAR)
      /test/csuite/wt2535_insert_race/main.c: 59 in main()
      53
      54      opts = &_opts;
      55      memset(opts, 0, sizeof(*opts));
      56      opts->nthreads = 10;
      57      opts->nrecords = 1000;
      58      opts->table_type = TABLE_ROW;
      >>>     CID 1356053:  Insecure data handling  (TAINTED_SCALAR)
      >>>     Passing tainted variable "argv" to a tainted sink.
      59      testutil_check(testutil_parse_opts(argc, argv, opts));
      60      testutil_make_work_dir(opts->home);
      61
      62      testutil_check(wiredtiger_open(opts->home, NULL,
      63          "create,"
      64          "cache_size=2G,"
      
      ** CID 1356052:  Insecure data handling  (TAINTED_SCALAR)
      
      
      ________________________________________________________________________________________________________
      *** CID 1356052:  Insecure data handling  (TAINTED_SCALAR)
      /test/csuite/wt2246_col_append/main.c: 110 in main()
      104             char buf[100];
      105
      106             opts = &_opts;
      107             memset(opts, 0, sizeof(*opts));
      108             opts->table_type = TABLE_ROW;
      109             opts->n_append_threads = N_APPEND_THREADS;
      >>>     CID 1356052:  Insecure data handling  (TAINTED_SCALAR)
      >>>     Passing tainted variable "argv" to a tainted sink.
      110             testutil_check(testutil_parse_opts(argc, argv, opts));
      111             testutil_make_work_dir(opts->home);
      112
      113             snprintf(buf, sizeof(buf),
      114                 "create,"
      115                 "cache_size=%s,"
      
      ** CID 1356051:  Insecure data handling  (TAINTED_SCALAR)
      
      
      ________________________________________________________________________________________________________
      *** CID 1356051:  Insecure data handling  (TAINTED_SCALAR)
      /test/csuite/wt1965_col_efficiency/main.c: 126 in main()
      120             uint64_t f[NR_FIELDS], r, ts;
      121             int i, ret;
      122             char table_format[256];
      123
      124             opts = &_opts;
      125             memset(opts, 0, sizeof(*opts));
      >>>     CID 1356051:  Insecure data handling  (TAINTED_SCALAR)
      >>>     Passing tainted variable "argv" to a tainted sink.
      126             testutil_check(testutil_parse_opts(argc, argv, opts));
      127             testutil_make_work_dir(opts->home);
      128
      129             testutil_check(wiredtiger_open(opts->home, NULL,
      130                 "create,cache_size=1G,checkpoint=(wait=30),"
      131                 "eviction_trigger=80,eviction_target=64,eviction_dirty_target=65,"
      
      ** CID 1356050:    (NULL_RETURNS)
      /test/utility/parse_opts.c: 125 in testutil_parse_opts()
      /test/utility/parse_opts.c: 130 in testutil_parse_opts()
      
      
      ________________________________________________________________________________________________________
      *** CID 1356050:    (NULL_RETURNS)
      /test/utility/parse_opts.c: 125 in testutil_parse_opts()
      119             /*
      120              * Setup the home directory. It needs to be unique for every test
      121              * or the auto make parallel tester gets upset.
      122              */
      123             len = (size_t)snprintf(NULL, 0, "WT_TEST.%s", opts->progname) + 1;
      124             opts->home = (char *)malloc(len);
      >>>     CID 1356050:    (NULL_RETURNS)
      >>>     Dereferencing a pointer that might be null "opts->home" when calling "snprintf".
      125             snprintf(opts->home, len, "WT_TEST.%s", opts->progname);
      126
      127             /* Setup the default URI string */
      128             len = (size_t)snprintf(NULL, 0, "table:%s", opts->progname) + 1;
      129             opts->uri = (char *)malloc(len);
      130             snprintf(opts->uri, len, "table:%s", opts->progname);
      131
      132             return (0);
      /test/utility/parse_opts.c: 130 in testutil_parse_opts()
      124             opts->home = (char *)malloc(len);
      125             snprintf(opts->home, len, "WT_TEST.%s", opts->progname);
      126
      127             /* Setup the default URI string */
      128             len = (size_t)snprintf(NULL, 0, "table:%s", opts->progname) + 1;
      129             opts->uri = (char *)malloc(len);
      >>>     CID 1356050:    (NULL_RETURNS)
      >>>     Dereferencing a pointer that might be null "opts->uri" when calling "snprintf".
      130             snprintf(opts->uri, len, "table:%s", opts->progname);
      131
      132             return (0);
      

            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: