firmata / ConfigurableFirmata

A plugin-based version of Firmata
GNU Lesser General Public License v2.1
153 stars 72 forks source link

Issue handling zero-length SYSEX message #151

Closed mchesser closed 11 months ago

mchesser commented 1 year ago

The code doesn't handle zero length SYSEX messages correctly. Sending the message [START_SYSEX, END_SYSEX]/[0xf0, 0xf7], causes processSysexMessage to be called (here) with sysexBytesRead == 0.

I think this causes two issues:

https://github.com/firmata/ConfigurableFirmata/blob/c759e5a0375bdbb89efb0c7efe640dccd3305f65/src/ConfigurableFirmata.cpp#L216

In practice, I guess clients shouldn't generate these messages but I thought it was worth reporting.

pgrawehr commented 1 year ago

Thanks for the report.

I agree this is a minor issue, but should still be looked at.