[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170901165256.21459-1-phil@nwl.cc>
Date: Fri, 1 Sep 2017 18:52:50 +0200
From: Phil Sutter <phil@....cc>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org
Subject: [iproute PATCH 0/6] strlcpy() and strlcat() for iproute2
The following series adds my own implementations of strlcpy() and
strlcat() in patch 1 and changes the code to make use of them in the
following patches but the last two: Patch 5 just eliminates a line of
useless code I found while searching for potential users of the
introduced functions, patch 6 sanitizes a call to strncpy() in
misc/lnstat_util.c without using strlcpy() since lnstat is not being
linked against libutil.
I implemented both functions solely based on information in libbsd's man
pages, so they are safe to be released under the GPL.
Phil Sutter (6):
utils: Implement strlcpy() and strlcat()
Convert the obvious cases to strlcpy()
Convert harmful calls to strncpy() to strlcpy()
ipxfrm: Replace STRBUF_CAT macro with strlcat()
tc_util: No need to terminate an snprintf'ed buffer
lnstat_util: Make sure buffer is NUL-terminated
genl/ctrl.c | 2 +-
include/utils.h | 3 +++
ip/ipnetns.c | 3 +--
ip/iproute_lwtunnel.c | 3 +--
ip/ipvrf.c | 5 ++---
ip/ipxfrm.c | 21 +++++----------------
ip/xfrm_state.c | 2 +-
lib/bpf.c | 3 +--
lib/fs.c | 3 +--
lib/inet_proto.c | 3 +--
lib/utils.c | 19 +++++++++++++++++++
misc/lnstat_util.c | 3 ++-
misc/ss.c | 3 +--
tc/em_ipset.c | 3 +--
tc/tc_util.c | 1 -
15 files changed, 40 insertions(+), 37 deletions(-)
--
2.13.1
Powered by blists - more mailing lists