mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-06 19:40:10 +02:00
Fix audioMasterSpecific related segfaults
Not initializing our buffer is fine if something is going to write to it, but in this case the default way to handle `audioMasterSpecific` (and any other opcode without specific behaviour) would be to treat it as a writable string. Since the host wasn't actually writing to it we would just send some old data from the stack back which obviously would cause some plugins to crash.
This commit is contained in:
@@ -12,7 +12,6 @@ There are a few things that should be done before releasing this, including:
|
||||
XEmbed messages or skip reparenting altogether, but that's of course not
|
||||
ideal.
|
||||
- Fix implementation bugs:
|
||||
- KiloHearts plugins fail during initialization.
|
||||
- Serum crashes when closing bitwig (but otherwise exits just fine).
|
||||
- Melda plugins crash when opening their GUI.
|
||||
- Add missing details if any to the architecture section.
|
||||
|
||||
+4
-1
@@ -196,7 +196,10 @@ void passthrough_event(boost::asio::local::stream_protocol::socket& socket,
|
||||
event.payload, event.option);
|
||||
}
|
||||
|
||||
std::array<char, max_string_length> string_buffer;
|
||||
// This buffer is used to write strings and small objects to. We'll
|
||||
// initialize it with a single null to prevent it from being read as some
|
||||
// arbitrary C-style string.
|
||||
std::array<char, max_string_length> string_buffer{0};
|
||||
void* data = std::visit(
|
||||
overload{
|
||||
[&](const std::nullptr_t&) -> void* { return nullptr; },
|
||||
|
||||
Reference in New Issue
Block a user