Message ID | 1547713869-7679-2-git-send-email-anthony@ypwong.org |
---|---|
State | New |
Headers | show |
Series | Fix unusable SSD on configs that have 2 SSDs | expand |
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 138b2fb..c0d2179 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1943,7 +1943,7 @@ static void nvme_init_subnqn(struct nvme_subsystem *subsys, struct nvme_ctrl *ct nqnlen = strnlen(id->subnqn, NVMF_NQN_SIZE); if (nqnlen > 0 && nqnlen < NVMF_NQN_SIZE) { - strncpy(subsys->subnqn, id->subnqn, NVMF_NQN_SIZE); + strlcpy(subsys->subnqn, id->subnqn, NVMF_NQN_SIZE); return; }