strlcpy() and strlcat() for iproute2
Status from this message: Applied, thanks.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | utils: Implement strlcpy() and strlcat()include/ lib/ | +22 | 6 replies | |
| 2/6 | Convert the obvious cases to strlcpy()ip/ ip/ ip/ +5 more | +8 | 1 reply | |
| 3/6 | Convert harmful calls to strncpy() to strlcpy()genl/ ip/ ip/ | +3 | 0 replies | |
| 4/6 | ipxfrm: Replace STRBUF_CAT macro with strlcat()ip/ | +5 | 0 replies | |
| 5/6 | tc_util: No need to terminate an snprintf'ed buffertc/ | +0 | 0 replies | |
| 6/6 | lnstat_util: Make sure buffer is NUL-terminatedmisc/ | +2 | 0 replies |
Reviews trailers per patch
1 of 6 patches has a Reviewed-by or Acked-by.
| Patch | Daniel Borkmann |
|---|---|
| 1/6 | |
| 2/6 | A-b |
| 3/6 | |
| 4/6 | |
| 5/6 | |
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [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(-)
Signature · 1 line
2.13.1