mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 03:41:36 +08:00
uORB: fix copy-paste mistake in orb_print_message_internal
Could have led to invalid memory access.
This commit is contained in:
@@ -439,7 +439,7 @@ void orb_print_message_internal(const orb_metadata *meta, const void *data, bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
memcpy(topic_name, meta->o_fields + format_idx, topic_name_len);
|
memcpy(topic_name, meta->o_fields + format_idx, topic_name_len);
|
||||||
field_name[topic_name_len] = '\0';
|
topic_name[topic_name_len] = '\0';
|
||||||
|
|
||||||
// find the metadata
|
// find the metadata
|
||||||
const orb_metadata *const *topics = orb_get_topics();
|
const orb_metadata *const *topics = orb_get_topics();
|
||||||
|
|||||||
Reference in New Issue
Block a user