[Digikam-devel] New Defects reported by Coverity Scan for digiKam
scan-admin at coverity.com
scan-admin at coverity.com
Sun Jun 16 00:58:35 BST 2013
Hi,
Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan
Defect(s) Reported-by: Coverity Scan
** CID 1034289: Uninitialized scalar field (UNINIT_CTOR)
/mnt/devel/GIT/3.x/extra/libkface/libkface/alignment-congealing/funnelreal.cpp: 94
** CID 1034288: Untrusted value as argument (TAINTED_SCALAR)
** CID 1034287: Untrusted loop bound (TAINTED_SCALAR)
/mnt/devel/GIT/3.x/extra/libkface/libkface/alignment-congealing/funnelreal.cpp: 220
________________________________________________________________________
CID 1034289: Uninitialized scalar field (UNINIT_CTOR)
/mnt/devel/GIT/3.x/extra/libkface/libkface/alignment-congealing/funnelreal.cpp: 144 ( member_decl)
141 const int siftDescDim;
142
143 /// Training data
>>> Class member declaration for "numRandPxls".
144 int numRandPxls;
145 int numFeatureClusters;
146 int edgeDescDim;
147 std::vector<std::vector<float> > centroids;
148 std::vector<float> sigmaSq;
/mnt/devel/GIT/3.x/extra/libkface/libkface/alignment-congealing/funnelreal.cpp: 94 ( uninit_member)
91 }*/
92 paddingW = ((outerDimW - innerDimW) - 2*windowSize) / 2;
93 paddingH = ((outerDimH - innerDimH) - 2*windowSize) / 2;
>>> Non-static class member "numRandPxls" is not initialized in this constructor nor in any functions that it calls.
94 }
95
96 void loadTrainingData(const QString& path);
97 void computeGaussian(std::vector<std::vector<float> > &Gaussian, int windowSize) const;
98
/mnt/devel/GIT/3.x/extra/libkface/libkface/alignment-congealing/funnelreal.cpp: 145 ( member_decl)
142
143 /// Training data
144 int numRandPxls;
>>> Class member declaration for "numFeatureClusters".
145 int numFeatureClusters;
146 int edgeDescDim;
147 std::vector<std::vector<float> > centroids;
148 std::vector<float> sigmaSq;
149 std::vector<std::pair<int, int> > randPxls;
/mnt/devel/GIT/3.x/extra/libkface/libkface/alignment-congealing/funnelreal.cpp: 94 ( uninit_member)
91 }*/
92 paddingW = ((outerDimW - innerDimW) - 2*windowSize) / 2;
93 paddingH = ((outerDimH - innerDimH) - 2*windowSize) / 2;
>>> Non-static class member "numFeatureClusters" is not initialized in this constructor nor in any functions that it calls.
94 }
95
96 void loadTrainingData(const QString& path);
97 void computeGaussian(std::vector<std::vector<float> > &Gaussian, int windowSize) const;
98
/mnt/devel/GIT/3.x/extra/libkface/libkface/alignment-congealing/funnelreal.cpp: 146 ( member_decl)
143 /// Training data
144 int numRandPxls;
145 int numFeatureClusters;
>>> Class member declaration for "edgeDescDim".
146 int edgeDescDim;
147 std::vector<std::vector<float> > centroids;
148 std::vector<float> sigmaSq;
149 std::vector<std::pair<int, int> > randPxls;
150 std::vector<std::vector<std::vector<float> > > logDFSeq;
/mnt/devel/GIT/3.x/extra/libkface/libkface/alignment-congealing/funnelreal.cpp: 94 ( uninit_member)
91 }*/
92 paddingW = ((outerDimW - innerDimW) - 2*windowSize) / 2;
93 paddingH = ((outerDimH - innerDimH) - 2*windowSize) / 2;
>>> CID 1034289: Uninitialized scalar field (UNINIT_CTOR)
>>> Non-static class member "edgeDescDim" is not initialized in this constructor nor in any functions that it calls.
94 }
95
96 void loadTrainingData(const QString& path);
97 void computeGaussian(std::vector<std::vector<float> > &Gaussian, int windowSize) const;
98
________________________________________________________________________
CID 1034288: Untrusted value as argument (TAINTED_SCALAR)
/mnt/devel/GIT/3.x/extra/libkface/libkface/alignment-congealing/funnelreal.cpp: 163 ( tainted_data_argument)
160 kError() << "Training data for Congealing/Funnel not found. Should be at" << trainingFile;
161 return;
162 }
>>> Calling function "KFaceIface::FunnelReal::Private::loadTrainingData(QString const &)" taints argument "this->d->edgeDescDim".
163 d->loadTrainingData(trainingFile);
164 }
165
166 FunnelReal::~FunnelReal()
167 {
/mnt/devel/GIT/3.x/extra/libkface/libkface/alignment-congealing/funnelreal.cpp: 163 ( tainted_data)
160 kError() << "Training data for Congealing/Funnel not found. Should be at" << trainingFile;
161 return;
162 }
>>> CID 1034288: Untrusted value as argument (TAINTED_SCALAR)
>>> Passing tainted variable "this->d->edgeDescDim" to a tainted sink.
163 d->loadTrainingData(trainingFile);
164 }
165
166 FunnelReal::~FunnelReal()
167 {
________________________________________________________________________
CID 1034287: Untrusted loop bound (TAINTED_SCALAR)
/mnt/devel/GIT/3.x/extra/libkface/libkface/alignment-congealing/funnelreal.cpp: 214 ( tainted_data_argument)
211 std::ifstream trainingInfo(path.toLocal8Bit());
212 trainingInfo.exceptions(std::ifstream::failbit | std::ifstream::badbit);
213
>>> Calling function "std::basic_istream<char, std::char_traits<char> >::operator >>(int &)" taints argument "this->numFeatureClusters".
214 trainingInfo >> numFeatureClusters >> edgeDescDim;
215
216 std::vector<float> cRow(edgeDescDim, 0);
217 centroids = std::vector<std::vector<float> >(numFeatureClusters, cRow);
218 sigmaSq = std::vector<float>(numFeatureClusters);
/mnt/devel/GIT/3.x/extra/libkface/libkface/alignment-congealing/funnelreal.cpp: 220 ( tainted_data)
217 centroids = std::vector<std::vector<float> >(numFeatureClusters, cRow);
218 sigmaSq = std::vector<float>(numFeatureClusters);
219
>>> CID 1034287: Untrusted loop bound (TAINTED_SCALAR)
>>> Using tainted variable "this->numFeatureClusters" as a loop boundary.
220 for(int i=0; i<numFeatureClusters; i++)
221 {
222 for(int j=0; j<edgeDescDim; j++)
223 {
224 trainingInfo >> centroids[i][j];
________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com
To unsubscribe from the email notification for new defects, http://scan5.coverity.com/cgi-bin/unsubscribe.py
More information about the Digikam-devel
mailing list