diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-07-14 14:06:59 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-08-07 14:04:02 -0400 |
commit | 345ebae7d0586d2f945b622f67f4027515ec4d40 (patch) | |
tree | c3caabad3c619279b67892253c02c4030908e8c9 /drivers/uwb | |
parent | 514e59c1195f2634dab025d952242f5e69e052c7 (diff) |
scsi: gdth: increase the procfs event buffer size
We print a 256 byte event string into a buffer that is only 161
bytes long, this is clearly wrong:
drivers/scsi/gdth_proc.c: In function 'gdth_show_info':
drivers/scsi/gdth.c:3660:41: error: '%s' directive writing up to 255 bytes into a region of size between 141 and 150 [-Werror=format-overflow=]
sprintf(buffer,"Adapter %d: %s\n",
^~
/git/arm-soc/drivers/scsi/gdth.c:3660:13: note: 'sprintf' output between 13 and 277 bytes into a destination of size 161
sprintf(buffer,"Adapter %d: %s\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dvr->eu.async.ionode,dvr->event_string);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc calculates that the worst case buffer size would be 277 bytes,
so we can use that.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/uwb')
0 files changed, 0 insertions, 0 deletions