mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-01 21:48:28 -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;
|
retcode = 2;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
if (packet.count > sizeof(data)) {
|
||||||
|
retcode = 5;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
if (!dev->get_semaphore()->take(10)) {
|
if (!dev->get_semaphore()->take(10)) {
|
||||||
retcode = 3;
|
retcode = 3;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Loading…
Reference in New Issue
Block a user