diff options
| author | 2020-03-15 10:42:41 +0100 | |
|---|---|---|
| committer | 2020-03-17 13:36:13 -0400 | |
| commit | 181aea8948e1e78f3cf59e1261d481011dfc3b10 (patch) | |
| tree | 6a8f70feadfd9fde50c93c8aa7e4282da2d1fd77 /drivers/scsi/pm8001/pm8001_init.c | |
| parent | scsi: core: Use scnprintf() for avoiding potential buffer overflow (diff) | |
| download | linux-dev-181aea8948e1e78f3cf59e1261d481011dfc3b10.tar.xz linux-dev-181aea8948e1e78f3cf59e1261d481011dfc3b10.zip | |
scsi: smartpqi: Use scnprintf() for avoiding potential buffer overflow
Since snprintf() returns the would-be-output size instead of the actual
output size, the succeeding calls may go beyond the given buffer limit.
Fix it by replacing with scnprintf().
Link: https://lore.kernel.org/r/20200315094241.9086-9-tiwai@suse.de
Cc: "James E . J . Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Don Brace <don.brace@microsemi.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_init.c')
0 files changed, 0 insertions, 0 deletions
