-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
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
large session names will silently fail #128
Comments
Thanks for reporting @folkertvanheusden and some initial checking I have initiated a fix in this branch using MSVS (I don't have a device at hand here). Can you do a quick check? Beware: the long session name will be truncated to |
Yes, that fixes the problem. |
@folkertvanheusden |
Hi,
With short (e.g. "aseqdump (129:0)") names it crashes.
|
tested with short and long names on an ESP32 |
Some additional context, if you read this later: the parser is designed to have a minimal memory footprint: small code and memory footprint. The parser buffer is only 64 bytes. Even for longer MIDI messages, 64 bytes is enough - the packet is sliced in 64 bytes and processed in pieces. For the initial AppleMIDI handshake, the session name can be longer than the 64 bytes buffer, the parser will truncate the session name ( Arduino-AppleMIDI-Library/src/AppleMIDI_Parser.h Lines 79 to 102 in be0be95
Arduino-AppleMIDI-Library/src/AppleMIDI.hpp Lines 41 to 45 in be0be95
|
Thanks for the explanation. I've tested be0be95 and it works fine now with both long and short names. |
When the initiator uses a large session-name (more than 48 bytes, including 0x00) causing the applesession-data to be more than 64 bytes (see static const size_t MaxBufferSize = 64; in AppleMIDI/src/AppleMIDI_Settings.h) then the library will not respond to the request, not even a reject will be send.
See this zip-file for network traces (included are text-dumps):
network-traces.zip
The text was updated successfully, but these errors were encountered: