More issues found by static analysis
This commit is contained in:
@@ -375,9 +375,11 @@ TEST(Core_Rand, Regression_Stack_Corruption)
|
||||
int bufsz = 128; //enough for 14 doubles
|
||||
AutoBuffer<uchar> buffer(bufsz);
|
||||
size_t offset = 0;
|
||||
cv::Mat_<cv::Point2d> x(2, 3, (cv::Point2d*)(buffer.data()+offset)); offset += x.total()*x.elemSize();
|
||||
double& param1 = *(double*)(buffer.data()+offset); offset += sizeof(double);
|
||||
double& param2 = *(double*)(buffer.data()+offset); offset += sizeof(double);
|
||||
cv::Mat_<cv::Point2d> x(2, 3, (cv::Point2d*)(buffer.data()+offset));
|
||||
offset += x.total()*x.elemSize();
|
||||
double& param1 = *(double*)(buffer.data()+offset);
|
||||
offset += sizeof(double);
|
||||
double& param2 = *(double*)(buffer.data()+offset);
|
||||
param1 = -9; param2 = 2;
|
||||
|
||||
cv::theRNG().fill(x, cv::RNG::NORMAL, param1, param2);
|
||||
|
||||
Reference in New Issue
Block a user