driver/qe: use strncpy instead of strcpy
strncpy is safer than strcpy, use it to instead of strcpy.
Signed-off-by: Zhao Qiang <B45475@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index f1df0a4..08620b2 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -435,7 +435,7 @@
* saved microcode information and put in the new.
*/
memset(&qe_firmware_info, 0, sizeof(qe_firmware_info));
- strcpy(qe_firmware_info.id, (char *)firmware->id);
+ strncpy(qe_firmware_info.id, (char *)firmware->id, 62);
qe_firmware_info.extended_modes = firmware->extended_modes;
memcpy(qe_firmware_info.vtraps, firmware->vtraps,
sizeof(firmware->vtraps));