aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_make_chunk.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-07-14 14:07:05 +0200
committerDavid S. Miller <davem@davemloft.net>2017-07-14 09:03:11 -0700
commit56c0da495a0b38f8ac0c0c0e3fcc750ea449daea (patch)
tree4bf2f6bbe9eeddc040331866231f36e36e3a0ec3 /net/sctp/sm_make_chunk.c
parentvmxnet3: avoid format strint overflow warning (diff)
downloadlinux-dev-56c0da495a0b38f8ac0c0c0e3fcc750ea449daea.tar.xz
linux-dev-56c0da495a0b38f8ac0c0c0e3fcc750ea449daea.zip
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>
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
0 files changed, 0 insertions, 0 deletions