If anything in PortMidi wants to write the string, it needs to know the length, to not overwrite the buffer boundaries.
Is this the case? how big needs the buffer to be?
OK, i got it. Normally the memory is maintained by Pm_GetDeviceInfo() and it is not intended to touch it.
The issue in Mixxx is sourced by testing code that simulates this behavior.
This is not an issue.
What was the reason for making PmDeviceInfo::name non const here: https://github.com/PortMidi/portmidi/blob/103beb136ca9833d47d3f3a150364330d78638e7/pm_common/portmidi.h#L222
We use it in Mixxx here: https://github.com/mixxxdj/mixxx/blob/main/src/test/portmidicontroller_test.cpp#L69 And after upgrade, compiling fails because we path a sting literal.
If anything in PortMidi wants to write the string, it needs to know the length, to not overwrite the buffer boundaries. Is this the case? how big needs the buffer to be?