]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: use strlcpy() instead of strcpy()
authorBart Van Assche <bvanassche@acm.org>
Mon, 8 Oct 2018 21:28:51 +0000 (14:28 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 17 Oct 2018 06:58:26 +0000 (08:58 +0200)
commit141c5e807a4e78edb92aafc7b2f5c1b8aeddd87c
treeb1a5db932cce38dae81a9ba074d640b3c2525657
parentca12530af428b25169faa9c9487aa28efd268744
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