Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-18532

New Defects reported by Coverity Scan for HPCC-Platform on 16th of October

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: unittests
    • Labels:
      None

      Description

      New defect(s) Reported-by: Coverity Scan Showing 2 of 2 defect(s)  

      ** CID 1458163:  Null pointer dereferences  (FORWARD_NULL)
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/tools/wutool/wutool.cpp: 222 in process(IConstWorkUnit &, IProperties *, const StringArray &)()
       
      ________________________________________________________________________________________________________
      *** CID 1458163:  Null pointer dereferences  (FORWARD_NULL)
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/tools/wutool/wutool.cpp: 222 in process(IConstWorkUnit &, IProperties *, const StringArray &)()
      216             Owned<IWorkUnitFactory> factory = getWorkUnitFactory();
      217             StringBuffer to;
      218             globals->getProp("TO", to);
      219             if (to.length()==0)
      220                 to.append('.');
      221             StringAttr wuid(w.queryWuid());
      >>>     CID 1458163:  Null pointer dereferences  (FORWARD_NULL)
      >>>     Passing null pointer "dynamic_cast <IExtendedWUInterface *>(w)"
      >>> to "archiveWorkUnit", which dereferences it. (The dereference
      >>> happens because this is a virtual function call.)
      222             if (QUERYINTERFACE(&w, IExtendedWUInterface)->archiveWorkUnit(to.str(), globals->getPropBool("DEL", false), true, globals->getPropBool("DELETERESULTS", false), globals->getPropBool("INCLUDEFILES", false)))
      223                 printf("archived %s\n", wuid.str());
      224             else
      225                 printf("archive of %s failed\n", wuid.str());
      226         }
      227         else if (stricmp(action, "info")==0)
       
      ** CID 1458164:  Null pointer dereferences  (REVERSE_INULL)
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/tools/wutool/wutool.cpp: 384 in main()
       
       
      ________________________________________________________________________________________________________
      *** CID 1458164:  Null pointer dereferences  (REVERSE_INULL)
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/tools/wutool/wutool.cpp: 384 in main()
      378                 const char *since = globals->queryProp("since");
      379                 if (since)
      380                     cutoff.setDateString(since, NULL);
      381             }
      382             Owned<IWorkUnitFactory> factory = getWorkUnitFactory();
      383     #ifdef _USE_CPPUNIT
      >>>     CID 1458164:  Null pointer dereferences  (REVERSE_INULL)
      >>>     Null-checking "action" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
      384             if (action && (stricmp(action, "-selftest")==0))
      385             {
      386                 StringBuffer testName;
      387                 if (!globals->getProp("test", testName))
      388                     testName.set("WuTool");
      389                 testSize = globals->getPropInt("testSize", 100);
       
       
      ________________________________________________________________________________________________________
      

       
      To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRaNjvQL1JwbRRXECNADpFWbJmd1u5Ft08MVOUAWsoMXj3-2FOk3grCOW6BgQyMmqdP24-3D_V7u2yOhiGAr-2Biu54nFTzz1cdmowKR-2FlEFg5vqux4F9vDUJEQivOGb3-2FR1eXYilORQhDu2iR721FklLC1mC-2Frfcrc47I4ygarDh3lcKLmES3xQg0n27Qc7c0NNxC5MnhDVO4ZouKDy5lJMZm7jdeylwy0O4RMVMA3fnYBdx-2BsYI2q4Q9O0GwW9qXPiNTe5mTApo0gmkC9JkhqNWgqHGpHGbDlhvAiLUOC9J3STHpMBe8-3D

        Attachments

          Activity

            People

            • Assignee:
              attilavamos Attila Vamos
              Reporter:
              attilavamos Attila Vamos
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: