Commit f5779b5
scsi: lpfc: Fix possible file string name overflow when updating firmware
Because file_name and phba->ModelName are both declared a size 80 bytes,
the extra ".grp" file extension could cause an overflow into file_name.
Define a ELX_FW_NAME_SIZE macro with value 84. 84 incorporates the 4 extra
characters from ".grp". file_name is changed to be declared as a char and
initialized to zeros i.e. null chars.
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20231031191224.150862-3-justintee8345@gmail.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent 2fe4b6a commit f5779b5
2 files changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14721 | 14721 | | |
14722 | 14722 | | |
14723 | 14723 | | |
14724 | | - | |
| 14724 | + | |
14725 | 14725 | | |
14726 | 14726 | | |
14727 | 14727 | | |
| |||
14730 | 14730 | | |
14731 | 14731 | | |
14732 | 14732 | | |
14733 | | - | |
| 14733 | + | |
14734 | 14734 | | |
14735 | 14735 | | |
14736 | 14736 | | |
| |||
0 commit comments