lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230211092139.5fb1078e@hermes.local>
Date:   Sat, 11 Feb 2023 09:21:39 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Xin Long <lucien.xin@...il.com>
Cc:     network dev <netdev@...r.kernel.org>,
        David Ahern <dsahern@...il.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
        Davide Caratti <dcaratti@...hat.com>
Subject: Re: [PATCH iproute2-next] tc: m_ct: add support for helper

On Fri, 10 Feb 2023 16:43:13 -0500
Xin Long <lucien.xin@...il.com> wrote:

> +static void ct_print_helper(struct rtattr *family, struct rtattr *proto, struct rtattr *name)
> +{
> +	char helper[32], buf[32], *n;
> +	int *f, *p;
> +
> +	if (!family || !proto || !name)
> +		return;
> +
> +	f = RTA_DATA(family);
> +	p = RTA_DATA(proto);
> +	n = RTA_DATA(name);
> +	sprintf(helper, "%s-%s-%s", (*f == AF_INET) ? "ipv4" : "ipv6",
> +		inet_proto_n2a(*p, buf, sizeof(buf)), n);

Please us snprintf to avoid possible string overflows

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ