mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-23 23:03:55 +02:00
Make many conversions sampleCount->size_t are explicit and checked...
... with run-time assertions. I examined each place and reasoned that the narrowing was safe, and commented why so. Again, there are places where the sampleCount variable will later be changed to have a different type, and they are not changed here.
This commit is contained in:
@@ -487,6 +487,7 @@ bool EffectChangeSpeed::ProcessOne(WaveTrack * track,
|
||||
|
||||
float * inBuffer = new float[inBufferSize];
|
||||
|
||||
// mFactor is at most 100-fold so this shouldn't overflow size_t
|
||||
auto outBufferSize =
|
||||
(sampleCount)((mFactor * inBufferSize) + 10);
|
||||
float * outBuffer = new float[outBufferSize];
|
||||
|
Reference in New Issue
Block a user