AP_Mount: topotek safely parses version

This commit is contained in:
Randy Mackay 2024-07-23 16:51:42 +09:00 committed by Andrew Tridgell
parent efc7a9071a
commit cfd1e98333

View File

@ -1076,6 +1076,9 @@ void AP_Mount_Topotek::gimbal_version_analyse()
version[ver_count++] = ver_num;
ver_num = 0;
}
if (ver_count >= ARRAY_SIZE(version)) {
break;
}
}
} else {
if (data_buf_len >= 1) {