aboutsummaryrefslogtreecommitdiff
path: root/mm/kasan/quarantine.c
diff options
context:
space:
mode:
authorArnd Bergmann2017-07-17 14:00:00 +0200
committerMartin K. Petersen2017-08-07 14:04:02 -0400
commitb192b42a70393c5194acf48c65d320c824f1d261 (patch)
tree079446ef98073b111c8901603177fe8b7691c9d0 /mm/kasan/quarantine.c
parent345ebae7d0586d2f945b622f67f4027515ec4d40 (diff)
scsi: fusion: fix string overflow warning
gcc points out a theorerical string overflow: drivers/message/fusion/mptbase.c: In function 'mpt_detach': drivers/message/fusion/mptbase.c:2103:17: error: '%s' directive writing up to 31 bytes into a region of size 28 [-Werror=format-overflow=] sprintf(pname, MPT_PROCFS_MPTBASEDIR "/%s/summary", ioc->name); ^~~~~ drivers/message/fusion/mptbase.c:2103:2: note: 'sprintf' output between 13 and 44 bytes into a destination of size 32 We can simply double the size of the local buffer here to be on the safe side, and using snprintf() instead of sprintf() protects us if ioc->name was not terminated properly. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'mm/kasan/quarantine.c')
0 files changed, 0 insertions, 0 deletions