Skip to content

Commit

Permalink
AUSDK: Fix out-of-bounds read when fetching parameter names
Browse files Browse the repository at this point in the history
  • Loading branch information
reuk committed Dec 7, 2023
1 parent 9c5d86c commit 4a172a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/juce_audio_plugin_client/AU/AudioUnitSDK/AUBase.h
Expand Up @@ -490,7 +490,7 @@ class AUBase : public ComponentBase {
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);
}

Expand Down
@@ -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.

0 comments on commit 4a172a3

Please sign in to comment.