diff options
author | Sreekanth Reddy <sreekanth.reddy@broadcom.com> | 2022-05-11 12:56:20 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-05-19 20:16:25 -0400 |
commit | 8e129add48e0c35a8f1bf5df91f50a438dd75ba6 (patch) | |
tree | b9f6175466c2764de06f20405c6d3a4129695cfa /drivers/scsi | |
parent | aabd5fea49461c7b3a70d7aaa965e8cb3f19b7e7 (diff) | |
download | lwn-8e129add48e0c35a8f1bf5df91f50a438dd75ba6.tar.gz lwn-8e129add48e0c35a8f1bf5df91f50a438dd75ba6.zip |
scsi: mpt3sas: Fix junk chars displayed while printing ChipName
Terminate string after copying 16 bytes of ChipName data from Manufacturing
Page0 to prevent %s from printing junk characters.
Link: https://lore.kernel.org/r/20220511072621.30657-1-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 4961be5d527b..37d46ae5c61d 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -4753,7 +4753,7 @@ static void _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc) { int i = 0; - char desc[16]; + char desc[17] = {0}; u32 iounit_pg1_flags; u32 bios_version; |