mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-23 23:40:47 +08:00
recv_data() read bytes into the 45 byte message buffer until it saw the stop byte, with no limit, ignored read() failures, and its caller used the buffer and id even when nothing valid had arrived. Pass the buffer size and give up on a reply that does not end within it or when a read fails, take the id only once it has been received, and skip processing when no reply came in. Reported by @TougerF1 and @Hama1cco. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Julian Oes <julian@oes.ch>