We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I built and ran the 'mm' program. There were no devices connected; 'mm' showed none. I typed '0' for the input device ID. 'mm' crashed:
MIDI input devices: Type input device number: 0 zsh: segmentation fault mm
It turns out that Pm_OpenOutput has an extra test that Pm_OpenInput doesn't have. Here is a diff:
$ diff -u portmidi.c-ORIG portmidi.c --- portmidi.c-ORIG 2024-12-03 14:03:48 +++ portmidi.c 2025-01-22 14:03:19 @@ -954,7 +954,9 @@ *stream = NULL; /* invariant: *stream == midi */ /* arg checking */ - if (!pm_descriptors[inputDevice].pub.input) + if (inputDevice < 0 || inputDevice >= pm_descriptor_len) + err = pmInvalidDeviceId; + else if (!pm_descriptors[inputDevice].pub.input) err = pmInvalidDeviceId; else if (pm_descriptors[inputDevice].pub.opened) err = pmInvalidDeviceId;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I built and ran the 'mm' program. There were no devices connected; 'mm' showed none. I typed '0' for the input device ID. 'mm' crashed:
It turns out that Pm_OpenOutput has an extra test that Pm_OpenInput doesn't have.
Here is a diff:
The text was updated successfully, but these errors were encountered: