nvmet: use strlcpy() instead of strcpy()
commit5eadc9cce17100caef88e972abeeeca7ef6d8a92
authorBart Van Assche <bvanassche@acm.org>
Mon, 8 Oct 2018 21:28:51 +0000 (8 14:28 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 17 Oct 2018 06:58:26 +0000 (17 08:58 +0200)
treeb1a5db932cce38dae81a9ba074d640b3c2525657
parent40581d1a91a1527e1e15350e479156810a389a96
nvmet: use strlcpy() instead of strcpy()

Although the code modified by this patch looks fine to me, this patch avoids
that Coverity reports the following complaint (ID 1364971 and ID 1364973):
"You might overrun the 256-character fixed-size string id->subnqn".

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/discovery.c