mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-09 22:53:55 +01:00
Bug 1501 again: don't crash for extreme Start values for FindClipping
This commit is contained in:
@@ -159,7 +159,17 @@ bool EffectFindClipping::ProcessOne(LabelTrack * lt,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
float *buffer = new float[blockSize];
|
float *buffer;
|
||||||
|
try {
|
||||||
|
if (blockSize < mStart)
|
||||||
|
// overflow
|
||||||
|
throw std::bad_alloc{};
|
||||||
|
buffer = new float[blockSize];
|
||||||
|
}
|
||||||
|
catch( const std::bad_alloc & ) {
|
||||||
|
wxMessageBox(_("Requested value exceeds memory capacity."));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
float *ptr = buffer;
|
float *ptr = buffer;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user