diff --git a/drivers/staging/greybus/firmware.c b/drivers/staging/greybus/firmware.c index 13efaabb891b..e888b7ae4c59 100644 --- a/drivers/staging/greybus/firmware.c +++ b/drivers/staging/greybus/firmware.c @@ -38,9 +38,10 @@ static int download_firmware(struct gb_firmware *firmware, u8 stage) * * XXX Name it properly.. */ - sprintf(firmware_name, "ara:%04x:%04x:%04x:%04x:%04x.fw", intf->unipro_mfg_id, - intf->unipro_prod_id, intf->ara_vend_id, intf->ara_prod_id, - stage); + snprintf(firmware_name, sizeof(firmware_name), + "ara:%04x:%04x:%04x:%04x:%04x.fw", + intf->unipro_mfg_id, intf->unipro_prod_id, + intf->ara_vend_id, intf->ara_prod_id, stage); return request_firmware(&firmware->fw, firmware_name, &connection->dev); }