|
@@ -1810,7 +1810,7 @@ static void nvme_init_subnqn(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
|
|
|
|
|
|
nqnlen = strnlen(id->subnqn, NVMF_NQN_SIZE);
|
|
|
if (nqnlen > 0 && nqnlen < NVMF_NQN_SIZE) {
|
|
|
- strcpy(ctrl->subnqn, id->subnqn);
|
|
|
+ strncpy(ctrl->subnqn, id->subnqn, NVMF_NQN_SIZE);
|
|
|
return;
|
|
|
}
|
|
|
|