mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Redundantly limit number of drag-and-drop formats
As reported in #149, the DrumCore 3 plugin would segfault when trying to drag files from it. This happened because the plugin presumably underflows somewhere and then reports that it supports 4294967282 different drag-and-drop formats, even though yabridge asked for a maximum of 16.
This commit is contained in:
@@ -20,6 +20,10 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
when the GUI changes. Yabridge now detects this, and removes the throttling we
|
||||
have in place to prevent certain other plugins from getting stuck in infinite
|
||||
loops.
|
||||
- Fixed **DrumCore 3** crashing when trying to drag grooves from the plugin to
|
||||
other applications. This happened because of an integer underflow in that
|
||||
plugin, causing the number of reported drag-and-drop formats to be magnitudes
|
||||
higher than yabridge's indicated maximum.
|
||||
- Fixed Wine version detection in the build configuration.
|
||||
|
||||
## [3.7.0] - 2021-11-21
|
||||
|
||||
@@ -790,6 +790,11 @@ void CALLBACK dnd_winevent_callback(HWINEVENTHOOK /*hWinEventHook*/,
|
||||
&num_formats);
|
||||
enumerator->Release();
|
||||
|
||||
// NOTE: This DrumCore 3 plugin reports 4294967282 for `num_formats` which
|
||||
// is uh a lot more than 16. So to prevent causing a segfault here we
|
||||
// need to manually cap `num_formats` to 16.
|
||||
num_formats = std::min(num_formats, static_cast<unsigned int>(16));
|
||||
|
||||
// NOTE: MeldaProduction plugins don't return any supported formats for some
|
||||
// reason, so we'll hardcode a HDROP
|
||||
if (num_formats == 0) {
|
||||
|
||||
Reference in New Issue
Block a user