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:
parent
cb3f80d0f2
commit
8e2ef8f986
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user