2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 06:34:11 +08:00
linux-next/drivers/scsi/ibmvscsi_tgt
Laura Abbott d792d4c4fc scsi: ibmvscsis: Fix a stringop-overflow warning
There's currently a warning about string overflow with strncat:

drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c: In function 'ibmvscsis_probe':
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:3479:2: error: 'strncat' specified
bound 64 equals destination size [-Werror=stringop-overflow=]
  strncat(vscsi->eye, vdev->name, MAX_EYE);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Switch to a single snprintf instead of a strcpy + strcat to handle this
cleanly.

Signed-off-by: Laura Abbott <labbott@redhat.com>
Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-09-17 02:49:55 -04:00
..
ibmvscsi_tgt.c scsi: ibmvscsis: Fix a stringop-overflow warning 2018-09-17 02:49:55 -04:00
ibmvscsi_tgt.h ibmvscsis: Enable Logical Partition Migration Support 2017-06-08 23:26:37 -07:00
libsrp.c
libsrp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile