AP_UAVCAN: fixed build on Linux

This commit is contained in:
Andrew Tridgell 2019-12-31 08:41:18 +11:00
parent 6bd7364f24
commit b98d5834b4
2 changed files with 2 additions and 2 deletions

View File

@ -176,7 +176,7 @@ private:
uavcan::Node<0> *_node;
uint8_t _driver_index;
char _thread_name[9];
char _thread_name[13];
bool _initialized;
///// SRV output /////
struct {

View File

@ -546,7 +546,7 @@ void trampoline_handleNodeInfo(const uavcan::ServiceCallResult<uavcan::protocol:
uavcan::copy(resp.getResponse().hardware_version.unique_id.begin(),
resp.getResponse().hardware_version.unique_id.end(),
unique_id);
snprintf(name, ARRAY_SIZE(name), "%s", resp.getResponse().name.c_str());
strncpy(name, resp.getResponse().name.c_str(), sizeof(name)-1);
AP::uavcan_dna_server().handleNodeInfo(node_id, unique_id, name);
}