mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-22 03:00:36 +08:00
uorb: enure message definitions don't exceed buffer lengths & increase test buffer
There were already checks at runtime, but this ensures the format is not too long at built-time.
This commit is contained in:
@@ -53,7 +53,10 @@ public:
|
||||
|
||||
TEST_F(uORBMessageFieldsTest, decompressed_formats_match)
|
||||
{
|
||||
char buffer[1500];
|
||||
char buffer[1600];
|
||||
static_assert(uORB::orb_untokenized_fields_max_length < sizeof(buffer) - HEATSHRINK_DECODER_INPUT_BUFFER_SIZE(_),
|
||||
"msg definition too long / buffer too short");
|
||||
|
||||
uORB::MessageFormatReader format_reader(buffer, sizeof(buffer));
|
||||
|
||||
px4::Bitset<ORB_TOPICS_COUNT> formats_found;
|
||||
|
||||
Reference in New Issue
Block a user