scsi: qla2xxx: Array index may go out of bound
authorNilesh Javali <njavali@marvell.com>
Wed, 7 Jun 2023 11:38:36 +0000 (17:08 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 15 Jun 2023 02:06:01 +0000 (22:06 -0400)
commitd721b591b95cf3f290f8a7cbe90aa2ee0368388d
tree43cde13cc3d0d7c82b41d45c8ae6009377e68a70
parenteb91eb809c8dfe7a7cc7aedd0670cdc2bb1174b9
scsi: qla2xxx: Array index may go out of bound

Klocwork reports array 'vha->host_str' of size 16 may use index value(s)
16..19.  Use snprintf() instead of sprintf().

Cc: stable@vger.kernel.org
Co-developed-by: Bikash Hazarika <bhazarika@marvell.com>
Signed-off-by: Bikash Hazarika <bhazarika@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230607113843.37185-2-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_os.c