Searched hist:a8db6140 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/scsi/qedf/ |
H A D | qedf_dbg.c | a8db6140 Fri Feb 02 07:12:20 CST 2018 Arnd Bergmann <arnd@arndb.de> scsi: qedf: use correct strncpy() size
gcc-8 warns during link-time optimization that the strncpy() call passes the size of the source buffer rather than the destination:
drivers/scsi/qedf/qedf_dbg.c: In function 'qedf_uevent_emit': include/linux/string.h:253: error: 'strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
This changes it to strscpy() with the correct length, guaranteeing a properly nul-terminated string of the right size.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Chad Dupuis <chad.dupuis@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> a8db6140 Fri Feb 02 07:12:20 CST 2018 Arnd Bergmann <arnd@arndb.de> scsi: qedf: use correct strncpy() size gcc-8 warns during link-time optimization that the strncpy() call passes the size of the source buffer rather than the destination: drivers/scsi/qedf/qedf_dbg.c: In function 'qedf_uevent_emit': include/linux/string.h:253: error: 'strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=] This changes it to strscpy() with the correct length, guaranteeing a properly nul-terminated string of the right size. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Chad Dupuis <chad.dupuis@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|