diff --git a/doc/src/toc.c b/doc/src/toc.c index a91c2a7..921bcf6 100644 --- a/doc/src/toc.c +++ b/doc/src/toc.c @@ -17,7 +17,7 @@ libraries (e.g. "nl-route", "nl-genl", ...). The library is designed to ensure that all components are optional, i.e. even though the core library provides a caching system which allows to -easly manage objects of any kind, no application is required to use this +easily manage objects of any kind, no application is required to use this caching system if it has no need for it. The library was developed and tested on 2.6.x and 3.x kernel releases. It @@ -39,7 +39,7 @@ git://git.infradead.org/users/tgr/libnl.git \section main_website Website -- http://www.infradead.org/~tgr/libnl/ +- https://www.infradead.org/~tgr/libnl/ \section main_mailinglist Mailinglist @@ -49,6 +49,6 @@ Please post questions and patches to the libnl mailinglist: libnl@lists.infradead.org @endcode -- Archives: http://canuck.infradead.org/pipermail/libnl/ +- Archives: https://lists.infradead.org/pipermail/libnl/ */ diff --git a/include/netlink/cli/utils.h b/include/netlink/cli/utils.h index ea89fc6..4c28343 100644 --- a/include/netlink/cli/utils.h +++ b/include/netlink/cli/utils.h @@ -61,8 +61,10 @@ extern "C" { #endif extern uint32_t nl_cli_parse_u32(const char *); -extern void nl_cli_print_version(void); -extern void nl_cli_fatal(int, const char *, ...); +extern void nl_cli_print_version(void) + __attribute__((noreturn)); +extern void nl_cli_fatal(int, const char *, ...) + __attribute__((noreturn)); extern struct nl_addr * nl_cli_addr_parse(const char *, int); extern int nl_cli_connect(struct nl_sock *, int); extern struct nl_sock * nl_cli_alloc_socket(void); diff --git a/lib/netfilter/exp.c b/lib/netfilter/exp.c index 650127c..24ec55f 100644 --- a/lib/netfilter/exp.c +++ b/lib/netfilter/exp.c @@ -357,10 +357,10 @@ static int nfnl_exp_build_tuple(struct nl_msg *msg, const struct nfnl_exp *exp, int type = exp_get_tuple_attr(cta); - if (cta == CTA_EXPECT_NAT) - tuple = nla_nest_start(msg, CTA_EXPECT_NAT_TUPLE); - else - tuple = nla_nest_start(msg, cta); + if (cta == CTA_EXPECT_NAT) + tuple = nla_nest_start(msg, CTA_EXPECT_NAT_TUPLE); + else + tuple = nla_nest_start(msg, cta); if (!tuple) goto nla_put_failure; diff --git a/lib/xfrm/sa.c b/lib/xfrm/sa.c index 74b7ee9..9e2c353 100644 --- a/lib/xfrm/sa.c +++ b/lib/xfrm/sa.c @@ -1175,7 +1175,10 @@ static int build_xfrm_sa_message(struct xfrmnl_sa *tmpl, int cmd, int flags, str strncpy(auth->alg_name, tmpl->auth->alg_name, sizeof(auth->alg_name)); auth->alg_key_len = tmpl->auth->alg_key_len; memcpy(auth->alg_key, tmpl->auth->alg_key, (tmpl->auth->alg_key_len + 7) / 8); - NLA_PUT(msg, XFRMA_ALG_AUTH, len, auth); + if (nla_put(msg, XFRMA_ALG_AUTH, len, auth) < 0) { + free(auth); + goto nla_put_failure; + } free(auth); } }