aboutsummaryrefslogtreecommitdiff
path: root/drivers/qe/qe.c
diff options
context:
space:
mode:
authorZhao Qiang2015-05-05 15:53:33 +0800
committerYork Sun2015-08-03 12:06:36 -0700
commit0e0224ee627a71191a4e704c367c09723b995993 (patch)
treeee5a92d58d3672b27338959b84d2e7fb307ef504 /drivers/qe/qe.c
parente94a8fd36300b1df347f034e0cfa6704dad83b6d (diff)
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>
Diffstat (limited to 'drivers/qe/qe.c')
-rw-r--r--drivers/qe/qe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index f1df0a419ca..08620b23a71 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -435,7 +435,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware)
* 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));