goToMain / libosdp

Implementation of IEC 60839-11-5 OSDP (Open Supervised Device Protocol); provides a C library with support for C++, Rust and Python3
https://libosdp.sidcha.dev
Apache License 2.0
130 stars 69 forks source link

Incorrect handling of length in CMD_ABORT #109

Closed surendersampath closed 1 year ago

surendersampath commented 1 year ago

Describe the bug In the PD side, the length is handled incorrectly for a zero length command. CMD_ABORT is a zero length command just like CMD_POLL. Hence, its length should be checked similarly as it's being done in CMD_POLL.

Expected behavior image Observed behavior image

sidcha commented 1 year ago

Thanks for reporting it.

Btw, you could have created a PR for this change in half the time it took to create this issue. I'm not complaining, just saying :).

surendersampath commented 1 year ago

Thanks. Will do it next time. Cheers.