1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

AUSDK: Fix out-of-bounds read when fetching parameter names

This commit is contained in:
reuk 2023-12-07 14:47:48 +00:00
parent 9c5d86cb4f
commit 4a172a3d71
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
2 changed files with 7 additions and 1 deletions

View file

@ -490,7 +490,7 @@ protected:
if (inShouldRelease) {
ioInfo.flags |= kAudioUnitParameterFlag_CFNameRelease;
}
CFStringGetCString(inName, &ioInfo.name[0], offsetof(AudioUnitParameterInfo, clumpID),
CFStringGetCString(inName, std::data(ioInfo.name), std::size(ioInfo.name),
kCFStringEncodingUTF8);
}

View file

@ -1 +1,7 @@
AUScopeElement.cpp - The method AUScope::RestoreElementNames was changed to only call AUElement::SetName if the name actually changed (instead of always). This is a workaround for a Ableton Live 11 bug which crashes on duplicating AUs with more than 16 output busses.
AUBase.h - The line that reads
CFStringGetCString(inName, std::data(ioInfo.name), std::size(ioInfo.name), ...
previously read
CFStringGetCString(inName, &ioInfo.name[0], offsetof(AudioUnitParameterInfo, clumpID), ...
This change is necessary because AudioUnitParameterInfo includes another data member between the `name` and `clumpID` members.