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]
Message-ID: <33fa1a5638b91958aa0b26069903de38a96ee3d0.camel@kernel.org>
Date:   Mon, 12 Oct 2020 17:24:54 -0500
From:   Tom Zanussi <zanussi@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.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

Hi Steve,

On Mon, 2020-10-12 at 18:14 -0400, Steven Rostedt wrote:
> 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;
> 	}
> 

Yeah, I think that's better, will change it.

Thanks,

Tom

> -- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ