Commit f4533727 authored by Daniel Agar's avatar Daniel Agar

fix buffer overflow

parent 1c552042
......@@ -189,7 +189,7 @@ void MAVLinkProtocol::_linkStatusChanged(LinkInterface* link, bool connected)
// Send command to start MAVLink
// XXX hacky but safe
// Start NSH
const char init[] = {0x0d, 0x0d, 0x0d};
const char init[] = {0x0d, 0x0d, 0x0d, 0x0d};
link->writeBytes(init, sizeof(init));
const char* cmd = "sh /etc/init.d/rc.usb\n";
link->writeBytes(cmd, strlen(cmd));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment