1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-30 15:39:27 +02:00

bug 451 (P2, http://bugzilla.audacityteam.org/show_bug.cgi?id=451) Failsafe read of "numsamples" tag value > "maxsamples" tag value. It's now recognized as an error in .aup data.

This commit is contained in:
v.audacity 2011-09-21 06:04:10 +00:00
parent cb3f80d0f2
commit 8e2ef8f986

View File

@ -789,7 +789,14 @@ bool Sequence::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
mSampleFormat = (sampleFormat)nValue;
}
else if (!wxStrcmp(attr, wxT("numsamples")))
{
if (nValue > mMaxSamples) // Disallow "numsamples" tag value > "maxsamples" tag value
{
mErrorOpening = true;
return false;
}
mNumSamples = nValue;
}
} // while
//// Both mMaxSamples and mSampleFormat should have been set.