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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 12 Jun 2022 09:10:19 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Paolo Lungaroni <paolo.lungaroni@...roma2.it>
Cc:     David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org,
        Jakub Kicinski <kuba@...nel.org>,
        Stefano Salsano <stefano.salsano@...roma2.it>,
        Ahmed Abdelsalam <ahabdels.dev@...il.com>,
        Andrea Mayer <andrea.mayer@...roma2.it>
Subject: Re: [iproute2-next v1] seg6: add support for flavors in SRv6 End*
 behaviors

On Sat, 11 Jun 2022 13:06:45 +0200
Paolo Lungaroni <paolo.lungaroni@...roma2.it> wrote:

> +	strlcpy(wbuf, buf, SEG6_LOCAL_FLV_BUF_SIZE);
> +	wbuf[SEG6_LOCAL_FLV_BUF_SIZE - 1] = 0;
> +
> +	if (strlen(wbuf) == 0)
> +		return -1;

If you use strdupa() then you don't have to worry about buffer sizes.

+			else {
+				if (fnumber++ == 0)
+					fprintf(fp, "%s", flv_name);
+				else
+					fprintf(fp, ",%s", flv_name);
+			}

Minor nits. I am trying to get rid of use of passing fp around
and just use print_string() everywhere. That way can do quick scan
for places still using 'fprintf(fp' as indicator of old code
that was never updated to use JSON.

Also, it looks the output of multiple flavors does not match
the input command line for multiple flavors.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ