Skip to content
Snippets Groups Projects
Commit 7715dea4 authored by John Keeping's avatar John Keeping Committed by Marek Vasut
Browse files

fastboot: avoid printing invalid data


There is no guarantee that commands are null-terminated in the USB
request buffer, so limit the length of data that is printed.

Signed-off-by: default avatarJohn Keeping <john@metanate.com>
Tested-by: default avatarSteve Rae <steve.rae@raedomain.com>
parent d3310842
No related branches found
No related tags found
No related merge requests found
......@@ -718,7 +718,7 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req)
}
if (!func_cb) {
error("unknown command: %s", cmdbuf);
error("unknown command: %.*s", req->actual, cmdbuf);
fastboot_tx_write_str("FAILunknown command");
} else {
if (req->actual < req->length) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment