Skip to content

string truncation warning fixes

Stephen Hemminger netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ip: use strlcpy() to avoid truncationip/iplink.c lib/namespace.c misc/nstat.c +3 more+18 -151 reply
2/5tunnel: use strlcpy to avoid strncpy warningsip/tunnel.c+6 -61 reply
3/5bridge: avoid snprint truncation on timebridge/mdb.c+2 -21 reply
4/5pedit: fix strncpy warningtc/m_pedit.c+1 -11 reply
5/5namespace: limit length of network namespacelib/namespace.c+7 -11 reply

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchDavid Ahern
1/5
2/5A-b
3/5A-b
4/5A-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH iproute2 0/5] string truncation warning fixes

Building iproute2 with gcc-8 shows some new warning about string truncation. These are obvious patches to fix most of these. Still need to fix lib/bpf.c and tc/m_ematch.c

Stephen Hemminger (5):
ip: use strlcpy() to avoid truncation
tunnel: use strlcpy to avoid strncpy warnings
bridge: avoid snprint truncation on time
pedit: fix strncpy warning
namespace: limit length of network namespace

 bridge/mdb.c    |  4 ++--
 ip/iplink.c     | 14 +++++++-------
 ip/tunnel.c     | 12 ++++++------
 lib/namespace.c | 14 +++++++++++---
 misc/nstat.c    |  4 ++--
 misc/ss.c       |  2 +-
 tc/m_ematch.c   |  2 +-
 tc/m_pedit.c    |  2 +-
 tc/tc_class.c   |  5 +++--
 9 files changed, 34 insertions(+), 25 deletions(-)
Signature · 1 line
2.16.2