Coverity #1321276 fixed 85/18485/2
Dhruv Khattar [Thu, 18 Aug 2016 11:53:50 +0000 (16:53 +0530)]
Change-Id: If8117d3cbf5807cee730771e11947b3dae3039f0

scilab/modules/polynomials/sci_gateway/cpp/sci_poly.cpp

index b489aa2..7e5dc5e 100644 (file)
@@ -178,8 +178,9 @@ types::Function::ReturnValue sci_poly(types::typed_list &in, int _iRetCount, typ
         }
 
         int piDimsArray[2] = {1, 1};
-        int iRanks = pDblIn->getSize() - 1;
-        pPolyOut = new types::Polynom(wstrName, 2, piDimsArray, &iRanks);
+        int *iRanks;
+        *iRanks = pDblIn->getSize() - 1;
+        pPolyOut = new types::Polynom(wstrName, 2, piDimsArray, iRanks);
         pPolyOut->setComplex(pDblIn->isComplex());
         pPolyOut->setCoef(0, pDblIn);
     }