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] [day] [month] [year] [list]
Date:   Thu, 23 Nov 2017 13:12:04 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Jamal Hadi Salim <jhs@...atatu.com>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 1/1] actions: Add support for user cookies

On Sat, 22 Apr 2017 08:36:23 -0400
Jamal Hadi Salim <jhs@...atatu.com> wrote:

> +
>  		fprintf(f, "\tAction statistics:\n");
>  		print_tcstats2_attr(f, tb[TCA_ACT_STATS], "\t", NULL);
> +		if (tb[TCA_ACT_COOKIE]) {
> +			int strsz = RTA_PAYLOAD(tb[TCA_ACT_COOKIE]);
> +			char b1[strsz+1];
> +
> +			fprintf(f, "\n\tcookie len %d %s ", strsz,
> +				hexstring_n2a(RTA_DATA(tb[TCA_ACT_COOKIE]),
> +					      strsz, b1, sizeof(b1)))

I don't think you need to print len here. Already know that by the output of 
hexstring. Since payload length is in bytes and hex takes two characters per byte
then the buffer needs to be bigger (like TCPCOOKIE_MAX_SIZE * 2 + 1)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ