linux/drivers/net/ethernet/cavium/liquidio
Arnd Bergmann 56c0da495a liquidio: fix possible eeprom format string overflow
gcc reports that the temporary buffer for computing the
string length may be too small here:

drivers/net/ethernet/cavium/liquidio/lio_ethtool.c: In function 'lio_get_eeprom_len':
/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:345:21: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=format-overflow=]
  len = sprintf(buf, "boardname:%s serialnum:%s maj:%lld min:%lld\n",
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:345:6: note: 'sprintf' output between 35 and 167 bytes into a destination of size 128
  len = sprintf(buf, "boardname:%s serialnum:%s maj:%lld min:%lld\n",

This extends it to 192 bytes, which is certainly enough. As far
as I could tell, there are no other constraints that require a specific
maximum size.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-14 09:03:11 -07:00
..
cn23xx_pf_device.c liquidio: fix bug in soft reset failure detection 2017-07-06 10:36:03 +01:00
cn23xx_pf_device.h liquidio: allocate RX buffers in OOM conditions in PF and VF 2017-03-22 19:36:43 -07:00
cn23xx_pf_regs.h liquidio CN23XX: fix for new check patch errors 2016-11-15 22:24:40 -05:00
cn23xx_vf_device.c liquidio: replace info-pointer mode with buffer-pointer-only mode 2017-06-18 23:55:46 -04:00
cn23xx_vf_device.h liquidio VF ethtool stats 2016-12-08 18:16:51 -05:00
cn23xx_vf_regs.h liquidio CN23XX: VF register definitions 2016-11-30 11:03:08 -05:00
cn66xx_device.c liquidio: fix bug in soft reset failure detection 2017-07-06 10:36:03 +01:00
cn66xx_device.h liquidio CN23XX: copyrights changes and alignment 2016-11-15 22:24:40 -05:00
cn66xx_regs.h liquidio CN23XX: fix for new check patch errors 2016-11-15 22:24:40 -05:00
cn68xx_device.c liquidio CN23XX: fix for new check patch errors 2016-11-15 22:24:40 -05:00
cn68xx_device.h liquidio CN23XX: copyrights changes and alignment 2016-11-15 22:24:40 -05:00
cn68xx_regs.h liquidio CN23XX: copyrights changes and alignment 2016-11-15 22:24:40 -05:00
lio_core.c liquidio: implement vlan filter enable and disable 2017-06-18 23:53:06 -04:00
lio_ethtool.c liquidio: fix possible eeprom format string overflow 2017-07-14 09:03:11 -07:00
lio_main.c liquidio: replace info-pointer mode with buffer-pointer-only mode 2017-06-18 23:55:46 -04:00
lio_vf_main.c liquidio: replace info-pointer mode with buffer-pointer-only mode 2017-06-18 23:55:46 -04:00
liquidio_common.h liquidio: replace info-pointer mode with buffer-pointer-only mode 2017-06-18 23:55:46 -04:00
liquidio_image.h liquidio CN23XX: copyrights changes and alignment 2016-11-15 22:24:40 -05:00
Makefile liquidio CN23XX: VF config setup 2016-11-30 11:03:08 -05:00
octeon_config.h liquidio: replace info-pointer mode with buffer-pointer-only mode 2017-06-18 23:55:46 -04:00
octeon_console.c liquidio: stop using huge static buffer, save 4096k in .data 2017-06-22 11:03:00 -04:00
octeon_device.c liquidio: replace info-pointer mode with buffer-pointer-only mode 2017-06-18 23:55:46 -04:00
octeon_device.h liquidio: fix insmod failure when multiple NICs are plugged in 2017-05-17 14:48:29 -04:00
octeon_droq.c liquidio: replace info-pointer mode with buffer-pointer-only mode 2017-06-18 23:55:46 -04:00
octeon_droq.h liquidio: replace info-pointer mode with buffer-pointer-only mode 2017-06-18 23:55:46 -04:00
octeon_iq.h liquidio: fix inaccurate count of napi-processed rx packets reported to Octeon 2017-05-26 14:41:48 -04:00
octeon_mailbox.c liquidio: fix rare pci_driver.probe failure of VF driver 2017-05-26 14:41:47 -04:00
octeon_mailbox.h liquidio: fix rare pci_driver.probe failure of VF driver 2017-05-26 14:41:47 -04:00
octeon_main.h sched/wait: Rename wait_queue_t => wait_queue_entry_t 2017-06-20 12:18:27 +02:00
octeon_mem_ops.c liquidio: stop using huge static buffer, save 4096k in .data 2017-06-22 11:03:00 -04:00
octeon_mem_ops.h liquidio: stop using huge static buffer, save 4096k in .data 2017-06-22 11:03:00 -04:00
octeon_network.h liquidio: replace info-pointer mode with buffer-pointer-only mode 2017-06-18 23:55:46 -04:00
octeon_nic.c liquidio: fix VF incorrectly indicating that it successfully set its VLAN 2017-04-08 08:38:41 -07:00
octeon_nic.h liquidio: fix VF incorrectly indicating that it successfully set its VLAN 2017-04-08 08:38:41 -07:00
request_manager.c liquidio: Fix checkpatch errors with references crossing single line 2017-06-02 14:17:17 -04:00
response_manager.c liquidio: fix for vf mac addr command sent to nic firmware 2017-03-21 17:48:29 -07:00
response_manager.h liquidio: fix for vf mac addr command sent to nic firmware 2017-03-21 17:48:29 -07:00