]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ibmvscsis: Ensure partition name is properly NUL terminated
authorLaura Abbott <labbott@redhat.com>
Tue, 11 Sep 2018 19:22:26 +0000 (12:22 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 17 Sep 2018 06:50:37 +0000 (02:50 -0400)
commit8b871a8028dd0f186d66b7a7a683efc2c3c3dae1
tree9865d48ff5f4c89aa9ed5b667df10e41f7195f3c
parentad8c39376b872cb135581325cbba5d4bf0623aba
scsi: ibmvscsis: Ensure partition name is properly NUL terminated

While reviewing another part of the code, Kees noticed that the strncpy of the
partition name might not always be NUL terminated. Switch to using strscpy
which does this safely.

Reported-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c