summaryrefslogtreecommitdiffstats
path: root/drivers/pps/clients
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-03-15 10:42:39 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-03-17 13:36:12 -0400
commitff33d0e2b9d10ba8a0ccb09261f5f9adb1ab32cb (patch)
tree9ca7a598c0a47d5591f22e739a3ad98763c2cf32 /drivers/pps/clients
parent6f0cf4247442b24486f64df8b613deb294274b7c (diff)
downloadlinux-stable-ff33d0e2b9d10ba8a0ccb09261f5f9adb1ab32cb.tar.gz
linux-stable-ff33d0e2b9d10ba8a0ccb09261f5f9adb1ab32cb.tar.bz2
linux-stable-ff33d0e2b9d10ba8a0ccb09261f5f9adb1ab32cb.zip
scsi: megaraid_sas: 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(). Also corrected the wrongly passed limit size. The remaining buffer size must be decremented. Link: https://lore.kernel.org/r/20200315094241.9086-7-tiwai@suse.de Cc: "James E . J . Bottomley" <jejb@linux.ibm.com> Cc: "Martin K . Petersen" <martin.petersen@oracle.com> Cc: Kashyap Desai <kashyap.desai@broadcom.com> Cc: Sumit Saxena <sumit.saxena@broadcom.com> Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.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/pps/clients')
0 files changed, 0 insertions, 0 deletions