Fix GCC14-detected warnings (#711)

* Fix pedantic GCC14 warnings on calloc order
* Ensure AAC read-in doesn't overflow internal structures when the file is corrupted/illegal.
This commit is contained in:
Earle F. Philhower, III authored and GitHub committed 2024-10-06 16:53:22 -07:00
1 parent a0a4a00757
commit 79208f6701
4 files changed
+11 -11

No files matched your search

+2 -2
View File
@@ -71,8 +71,8 @@ bool AudioOutputMixerStub::stop()
AudioOutputMixer::AudioOutputMixer(int buffSizeSamples, AudioOutput *dest) : AudioOutput()
{
buffSize = buffSizeSamples;
leftAccum = (int32_t*)calloc(sizeof(int32_t), buffSize);
rightAccum = (int32_t*)calloc(sizeof(int32_t), buffSize);
leftAccum = (int32_t*)calloc(buffSize, sizeof(int32_t));
rightAccum = (int32_t*)calloc(buffSize, sizeof(int32_t));
for (int i=0; i<maxStubs; i++) {
stubAllocated[i] = false;
stubRunning[i] = false;