[vtk-developers] New Defects reported by Coverity Scan for VTK

Ken Martin ken.martin at kitware.com
Mon Jan 18 09:56:41 EST 2016


Oops, that's me. I'll upgrade the cmake on that system :-)

On Sat, Jan 16, 2016 at 1:36 PM, Bill Lorensen <bill.lorensen at gmail.com>
wrote:

> These covertity defects have been fixed in cmake 3 by this commit:
>
> https://cmake.org/gitweb?p=cmake.git;a=commit;h=7eddefd8f1375c5c6f2fbe6e0e51f14bdc1f8886
>
> Could someone doing the coverity runs, please use cmake3?
>
>
> ---------- Forwarded message ----------
> From:  <scan-admin at coverity.com>
> Date: Fri, Jan 15, 2016 at 3:20 AM
> Subject: New Defects reported by Coverity Scan for VTK
> To: bill.lorensen at gmail.com
>
>
>
> Hi,
>
> Please find the latest report on new defect(s) introduced to VTK found
> with Coverity Scan.
>
> 80 new defect(s) introduced to VTK found with Coverity Scan.
> 8 defect(s), reported by Coverity Scan earlier, were marked fixed in
> the recent build analyzed by Coverity Scan.
>
> New defect(s) Reported-by: Coverity Scan
> Showing 20 of 80 defect(s)
>
>
> ** CID 1347735:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/Modeling/Testing/Cxx/vtkFiltersModelingCxxTests.cxx: 177 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347735:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/Modeling/Testing/Cxx/vtkFiltersModelingCxxTests.cxx: 177 in main()
> 171         }
> 172       if(testToRun != -1)
> 173         {
> 174         int result;
> 175         vtksys::SystemInformation::SetStackTraceOnError(1);
> 176
> >>>     CID 1347735:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 177         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 178
> 179         return result;
> 180         }
> 181
> 182
>
> ** CID 1347734:  Insecure data handling  (TAINTED_SCALAR)
> /Imaging/Morphological/Testing/Cxx/vtkImagingMorphologicalCxxTests.cxx:
> 198 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347734:  Insecure data handling  (TAINTED_SCALAR)
> /Imaging/Morphological/Testing/Cxx/vtkImagingMorphologicalCxxTests.cxx:
> 198 in main()
> 192             f->Disable("vtkRenderWindowInteractor");
> 193             f = collection->GetNextItem();
> 194             }
> 195           vtkObjectFactory::RegisterFactory(factory);
> 196           }
> 197
> >>>     CID 1347734:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 198         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 199
> 200        if (!interactive)
> 201          {
> 202          if (vtkTestingInteractor::TestReturnStatus != -1)
> 203             {
>
> ** CID 1347733:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/FlowPaths/Testing/Cxx/vtkFiltersFlowPathsCxxTests.cxx: 218 in
> main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347733:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/FlowPaths/Testing/Cxx/vtkFiltersFlowPathsCxxTests.cxx: 218 in
> main()
> 212             f->Disable("vtkRenderWindowInteractor");
> 213             f = collection->GetNextItem();
> 214             }
> 215           vtkObjectFactory::RegisterFactory(factory);
> 216           }
> 217
> >>>     CID 1347733:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 218         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 219
> 220        if (!interactive)
> 221          {
> 222          if (vtkTestingInteractor::TestReturnStatus != -1)
> 223             {
>
> ** CID 1347732:  Insecure data handling  (TAINTED_SCALAR)
> /IO/AMR/Testing/Cxx/vtkIOAMRCxxTests.cxx: 147 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347732:  Insecure data handling  (TAINTED_SCALAR)
> /IO/AMR/Testing/Cxx/vtkIOAMRCxxTests.cxx: 147 in main()
> 141         }
> 142       if(testToRun != -1)
> 143         {
> 144         int result;
> 145         vtksys::SystemInformation::SetStackTraceOnError(1);
> 146
> >>>     CID 1347732:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 147         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 148
> 149         return result;
> 150         }
> 151
> 152
>
> ** CID 1347731:  Insecure data handling  (TAINTED_SCALAR)
> /Rendering/Context2D/Testing/Cxx/vtkRenderingContext2DCxxTests.cxx:
> 147 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347731:  Insecure data handling  (TAINTED_SCALAR)
> /Rendering/Context2D/Testing/Cxx/vtkRenderingContext2DCxxTests.cxx:
> 147 in main()
> 141         }
> 142       if(testToRun != -1)
> 143         {
> 144         int result;
> 145         vtksys::SystemInformation::SetStackTraceOnError(1);
> 146
> >>>     CID 1347731:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 147         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 148
> 149         return result;
> 150         }
> 151
> 152
>
> ** CID 1347730:  Insecure data handling  (TAINTED_SCALAR)
> /Common/ExecutionModel/Testing/Cxx/vtkCommonExecutionModelCxxTests.cxx:
> 177 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347730:  Insecure data handling  (TAINTED_SCALAR)
> /Common/ExecutionModel/Testing/Cxx/vtkCommonExecutionModelCxxTests.cxx:
> 177 in main()
> 171         }
> 172       if(testToRun != -1)
> 173         {
> 174         int result;
> 175         vtksys::SystemInformation::SetStackTraceOnError(1);
> 176
> >>>     CID 1347730:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 177         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 178
> 179         return result;
> 180         }
> 181
> 182
>
> ** CID 1347729:  Insecure data handling  (TAINTED_SCALAR)
> /Common/System/Testing/Cxx/vtkCommonSystemCxxTests.cxx: 152 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347729:  Insecure data handling  (TAINTED_SCALAR)
> /Common/System/Testing/Cxx/vtkCommonSystemCxxTests.cxx: 152 in main()
> 146         }
> 147       if(testToRun != -1)
> 148         {
> 149         int result;
> 150         vtksys::SystemInformation::SetStackTraceOnError(1);
> 151
> >>>     CID 1347729:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 152         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 153
> 154         return result;
> 155         }
> 156
> 157
>
> ** CID 1347728:  Insecure data handling  (TAINTED_SCALAR)
> /IO/PLY/Testing/Cxx/vtkIOPLYCxxTests.cxx: 157 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347728:  Insecure data handling  (TAINTED_SCALAR)
> /IO/PLY/Testing/Cxx/vtkIOPLYCxxTests.cxx: 157 in main()
> 151         }
> 152       if(testToRun != -1)
> 153         {
> 154         int result;
> 155         vtksys::SystemInformation::SetStackTraceOnError(1);
> 156
> >>>     CID 1347728:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 157         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 158
> 159         return result;
> 160         }
> 161
> 162
>
> ** CID 1347727:  Insecure data handling  (TAINTED_SCALAR)
> /Rendering/LOD/Testing/Cxx/vtkRenderingLODCxxTests.cxx: 147 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347727:  Insecure data handling  (TAINTED_SCALAR)
> /Rendering/LOD/Testing/Cxx/vtkRenderingLODCxxTests.cxx: 147 in main()
> 141         }
> 142       if(testToRun != -1)
> 143         {
> 144         int result;
> 145         vtksys::SystemInformation::SetStackTraceOnError(1);
> 146
> >>>     CID 1347727:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 147         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 148
> 149         return result;
> 150         }
> 151
> 152
>
> ** CID 1347726:  Insecure data handling  (TAINTED_SCALAR)
> /Rendering/FreeType/Testing/Cxx/vtkRenderingFreeTypeCxxTests.cxx: 253 in
> main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347726:  Insecure data handling  (TAINTED_SCALAR)
> /Rendering/FreeType/Testing/Cxx/vtkRenderingFreeTypeCxxTests.cxx: 253 in
> main()
> 247             f->Disable("vtkRenderWindowInteractor");
> 248             f = collection->GetNextItem();
> 249             }
> 250           vtkObjectFactory::RegisterFactory(factory);
> 251           }
> 252
> >>>     CID 1347726:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 253         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 254
> 255        if (!interactive)
> 256          {
> 257          if (vtkTestingInteractor::TestReturnStatus != -1)
> 258             {
>
> ** CID 1347725:  Insecure data handling  (TAINTED_SCALAR)
> /Rendering/OpenGL2/Testing/Cxx/vtkRenderingOpenGL2CxxTests.cxx: 303 in
> main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347725:  Insecure data handling  (TAINTED_SCALAR)
> /Rendering/OpenGL2/Testing/Cxx/vtkRenderingOpenGL2CxxTests.cxx: 303 in
> main()
> 297             f->Disable("vtkRenderWindowInteractor");
> 298             f = collection->GetNextItem();
> 299             }
> 300           vtkObjectFactory::RegisterFactory(factory);
> 301           }
> 302
> >>>     CID 1347725:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 303         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 304
> 305        if (!interactive)
> 306          {
> 307          if (vtkTestingInteractor::TestReturnStatus != -1)
> 308             {
>
> ** CID 1347724:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/Verdict/Testing/Cxx/vtkFiltersVerdictCxxTests.cxx: 147 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347724:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/Verdict/Testing/Cxx/vtkFiltersVerdictCxxTests.cxx: 147 in main()
> 141         }
> 142       if(testToRun != -1)
> 143         {
> 144         int result;
> 145         vtksys::SystemInformation::SetStackTraceOnError(1);
> 146
> >>>     CID 1347724:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 147         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 148
> 149         return result;
> 150         }
> 151
> 152
>
> ** CID 1347723:  Insecure data handling  (TAINTED_SCALAR)
> /Rendering/Annotation/Testing/Cxx/vtkRenderingAnnotationCxxTests.cxx:
> 353 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347723:  Insecure data handling  (TAINTED_SCALAR)
> /Rendering/Annotation/Testing/Cxx/vtkRenderingAnnotationCxxTests.cxx:
> 353 in main()
> 347             f->Disable("vtkRenderWindowInteractor");
> 348             f = collection->GetNextItem();
> 349             }
> 350           vtkObjectFactory::RegisterFactory(factory);
> 351           }
> 352
> >>>     CID 1347723:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 353         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 354
> 355        if (!interactive)
> 356          {
> 357          if (vtkTestingInteractor::TestReturnStatus != -1)
> 358             {
>
> ** CID 1347722:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/Extraction/Testing/Cxx/vtkFiltersExtractionCxxTests.cxx: 162 in
> main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347722:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/Extraction/Testing/Cxx/vtkFiltersExtractionCxxTests.cxx: 162 in
> main()
> 156         }
> 157       if(testToRun != -1)
> 158         {
> 159         int result;
> 160         vtksys::SystemInformation::SetStackTraceOnError(1);
> 161
> >>>     CID 1347722:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 162         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 163
> 164         return result;
> 165         }
> 166
> 167
>
> ** CID 1347721:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/Geometry/Testing/Cxx/vtkFiltersGeometryCxxTests.cxx: 197 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347721:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/Geometry/Testing/Cxx/vtkFiltersGeometryCxxTests.cxx: 197 in main()
> 191         }
> 192       if(testToRun != -1)
> 193         {
> 194         int result;
> 195         vtksys::SystemInformation::SetStackTraceOnError(1);
> 196
> >>>     CID 1347721:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 197         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 198
> 199         return result;
> 200         }
> 201
> 202
>
> ** CID 1347720:  Insecure data handling  (TAINTED_SCALAR)
> /Parallel/Core/Testing/Cxx/vtkParallelCoreCxxTests.cxx: 147 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347720:  Insecure data handling  (TAINTED_SCALAR)
> /Parallel/Core/Testing/Cxx/vtkParallelCoreCxxTests.cxx: 147 in main()
> 141         }
> 142       if(testToRun != -1)
> 143         {
> 144         int result;
> 145         vtksys::SystemInformation::SetStackTraceOnError(1);
> 146
> >>>     CID 1347720:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 147         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 148
> 149         return result;
> 150         }
> 151
> 152
>
> ** CID 1347719:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/Sources/Testing/Cxx/vtkFiltersSourcesCxxTests.cxx: 267 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347719:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/Sources/Testing/Cxx/vtkFiltersSourcesCxxTests.cxx: 267 in main()
> 261         }
> 262       if(testToRun != -1)
> 263         {
> 264         int result;
> 265         vtksys::SystemInformation::SetStackTraceOnError(1);
> 266
> >>>     CID 1347719:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 267         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 268
> 269         return result;
> 270         }
> 271
> 272
>
> ** CID 1347718:  Insecure data handling  (TAINTED_SCALAR)
> /IO/SQL/Testing/Cxx/vtkIOSQLCxxTests.cxx: 157 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347718:  Insecure data handling  (TAINTED_SCALAR)
> /IO/SQL/Testing/Cxx/vtkIOSQLCxxTests.cxx: 157 in main()
> 151         }
> 152       if(testToRun != -1)
> 153         {
> 154         int result;
> 155         vtksys::SystemInformation::SetStackTraceOnError(1);
> 156
> >>>     CID 1347718:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 157         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 158
> 159         return result;
> 160         }
> 161
> 162
>
> ** CID 1347717:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/AMR/Testing/Cxx/vtkFiltersAMRCxxTests.cxx: 162 in main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347717:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/AMR/Testing/Cxx/vtkFiltersAMRCxxTests.cxx: 162 in main()
> 156         }
> 157       if(testToRun != -1)
> 158         {
> 159         int result;
> 160         vtksys::SystemInformation::SetStackTraceOnError(1);
> 161
> >>>     CID 1347717:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 162         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 163
> 164         return result;
> 165         }
> 166
> 167
>
> ** CID 1347716:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/Statistics/Testing/Cxx/vtkFiltersStatisticsCxxTests.cxx: 197 in
> main()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1347716:  Insecure data handling  (TAINTED_SCALAR)
> /Filters/Statistics/Testing/Cxx/vtkFiltersStatisticsCxxTests.cxx: 197 in
> main()
> 191         }
> 192       if(testToRun != -1)
> 193         {
> 194         int result;
> 195         vtksys::SystemInformation::SetStackTraceOnError(1);
> 196
> >>>     CID 1347716:  Insecure data handling  (TAINTED_SCALAR)
> >>>     Using tainted variable "testToRun" as an index into an array
> "cmakeGeneratedFunctionMapEntries".
> 197         result =
> (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
> 198
> 199         return result;
> 200         }
> 201
> 202
>
>
>
> ________________________________________________________________________________________________________
> To view the defects in Coverity Scan visit,
> https://scan.coverity.com/projects/vtk?tab=overview
>
> To manage Coverity Scan email notifications for
> "bill.lorensen at gmail.com", click
>
> https://scan.coverity.com/subscriptions/edit?email=bill.lorensen%40gmail.com&token=b58f4f57369f044961872c7f33d48117
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>


-- 
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee.  Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160118/d4300134/attachment-0001.html>


More information about the vtk-developers mailing list