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:   Mon, 12 Oct 2020 18:14:15 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Tom Zanussi <zanussi@...nel.org>
Cc:     axelrasmussen@...gle.com, mhiramat@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 6/7] tracing: Handle synthetic event array field type
 checking correctly

On Mon, 12 Oct 2020 15:18:08 -0500
Tom Zanussi <zanussi@...nel.org> wrote:

> @@ -630,8 +630,11 @@ static struct synth_field *parse_synth_field(int argc, const char **argv,
>  	if (field_type[0] == ';')
>  		field_type++;
>  	len = strlen(field_type) + 1;
> -	if (array)
> +	if (array) {
>  		len += strlen(array);
> +		if (array[strlen(array) - 1] == ';')
> +			len--;
> +	}

Why not:

	if (array) {
		int l = strlen(array);

		if (l && array[l - 1] == ';')
			l--;
		len += l;
	}

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ