diff --git a/.github/workflows/build-osx-wizmode.yml b/.github/workflows/build-osx-wizmode.yml index aa3f6657e..57af67cd6 100644 --- a/.github/workflows/build-osx-wizmode.yml +++ b/.github/workflows/build-osx-wizmode.yml @@ -14,7 +14,7 @@ env: jobs: build: # custom libpng build fails a test on macos-latest (11.x) - runs-on: macos-13 + runs-on: macos-15-intel steps: - uses: actions/checkout@v2 with: diff --git a/audio/RtMidi.cpp b/audio/RtMidi.cpp index fc4a3aa0c..3b28f84aa 100644 --- a/audio/RtMidi.cpp +++ b/audio/RtMidi.cpp @@ -1032,9 +1032,10 @@ void MidiOutCore :: sendMessage( std::vector *message ) return; } - Byte buffer[nBytes+(sizeof(MIDIPacketList))]; - ByteCount listSize = sizeof(buffer); - MIDIPacketList *packetList = (MIDIPacketList*)buffer; + // Replace the buffer VLA with a std::vector-based buffer to avoid VLA. + std::vector bufferVec(nBytes + sizeof(MIDIPacketList)); + ByteCount listSize = static_cast(bufferVec.size()); + MIDIPacketList *packetList = reinterpret_cast(bufferVec.data()); MIDIPacket *packet = MIDIPacketListInit( packetList ); ByteCount remainingBytes = nBytes;