1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 08:09:41 +02:00

always initialise maxidx, even if the data being analysed is pure silence, to avoid an uninitialised dereference later on

This commit is contained in:
RichardAsh1981@gmail.com 2014-08-06 18:46:40 +00:00
parent c2f31b27ac
commit b94c80a467

View File

@ -362,6 +362,7 @@ float FormatClassifier::Max(float* in, size_t len)
float FormatClassifier::Max(float* in, size_t len, size_t* maxidx)
{
float max = -FLT_MAX;
*maxidx = 0;
for (unsigned int n = 0; n < len; n++)
{