Closed ilue closed 5 years ago
Simd::Avx2::Detect32f` may call Simd::Base::Detect32f with out-of-range startStage.
https://github.com/ermig1979/Simd/blob/0b2929bcf7b87960b0a03a57ca7236b3b1076e3a/src/Simd/SimdAvx2Detection.cpp#L175 when i is hid.stages.size() - 1
https://github.com/ermig1979/Simd/blob/0b2929bcf7b87960b0a03a57ca7236b3b1076e3a/src/Simd/SimdAvx2Detection.cpp#L216 i + 1 will be hid.stages.size()
https://github.com/ermig1979/Simd/blob/0b2929bcf7b87960b0a03a57ca7236b3b1076e3a/src/Simd/SimdBaseDetection.cpp#L715 so access to stages[startStage] is out-of-range
Similar problem exists in SimdSse41Detection.cpp and SimdNeonDetection.cpp.
Thank you for bug report. I have fixed the bug.
Simd::Avx2::Detect32f` may call Simd::Base::Detect32f with out-of-range startStage.
https://github.com/ermig1979/Simd/blob/0b2929bcf7b87960b0a03a57ca7236b3b1076e3a/src/Simd/SimdAvx2Detection.cpp#L175 when i is hid.stages.size() - 1
https://github.com/ermig1979/Simd/blob/0b2929bcf7b87960b0a03a57ca7236b3b1076e3a/src/Simd/SimdAvx2Detection.cpp#L216 i + 1 will be hid.stages.size()
https://github.com/ermig1979/Simd/blob/0b2929bcf7b87960b0a03a57ca7236b3b1076e3a/src/Simd/SimdBaseDetection.cpp#L715 so access to stages[startStage] is out-of-range
Similar problem exists in SimdSse41Detection.cpp and SimdNeonDetection.cpp.