fix heap-buffer-overflow in wavelet, Detected by AddressSanitizer. #4127
This commit is contained in:
@@ -669,12 +669,12 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int
|
||||
#pragma omp parallel num_threads(numthreads)
|
||||
#endif
|
||||
{
|
||||
float *mean = new float [9];
|
||||
float *meanN = new float [9];
|
||||
float *sigma = new float [9];
|
||||
float *sigmaN = new float [9];
|
||||
float *MaxP = new float [9];
|
||||
float *MaxN = new float [9];
|
||||
float mean[10];
|
||||
float meanN[10];
|
||||
float sigma[10];
|
||||
float sigmaN[10];
|
||||
float MaxP[10];
|
||||
float MaxN[10];
|
||||
|
||||
float** varhue = new float*[tileheight];
|
||||
|
||||
@@ -1247,12 +1247,6 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int
|
||||
|
||||
delete [] varchro;
|
||||
|
||||
delete [] mean;
|
||||
delete [] meanN;
|
||||
delete [] sigma;
|
||||
delete [] sigmaN;
|
||||
delete [] MaxP;
|
||||
delete [] MaxN;
|
||||
}
|
||||
#ifdef _RT_NESTED_OPENMP
|
||||
omp_set_nested(oldNested);
|
||||
|
Reference in New Issue
Block a user