mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
GCS_MAVLink: prevent devop larger than buffer
This commit is contained in:
parent
4c9a851fc6
commit
973befa5d8
@ -48,6 +48,10 @@ void GCS_MAVLINK::handle_device_op_read(const mavlink_message_t &msg)
|
||||
retcode = 2;
|
||||
goto fail;
|
||||
}
|
||||
if (packet.count > sizeof(data)) {
|
||||
retcode = 5;
|
||||
goto fail;
|
||||
}
|
||||
if (!dev->get_semaphore()->take(10)) {
|
||||
retcode = 3;
|
||||
goto fail;
|
||||
|
Loading…
Reference in New Issue
Block a user