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]
Message-ID: <20161003111919.GA12073@kernel.org>
Date:   Mon, 3 Oct 2016 08:19:19 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Colin King <colin.king@...onical.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>,
        Wang Nan <wangnan0@...wei.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf probe: check if *ptr2 is zero and not ptr2

Em Mon, Oct 03, 2016 at 11:34:31AM +0100, Colin King escreveu:
> From: Colin Ian King <colin.king@...onical.com>
> 
> Static anaylsis with cppcheck detected an incorrect comparison:
> [tools/perf/util/probe-event.c:216]: (warning) Char literal compared with
> pointer 'ptr2'. Did you intend to dereference it?

What tool was used for that?

- Arnaldo
 
> Dereference ptr2 for the comparison to fix this.
> 
> Fixes: 35726d3a4ca9 ("perf probe: Fix to cut off incompatible chars from group name")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  tools/perf/util/probe-event.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index fcfbef0..d281ae2 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -213,7 +213,7 @@ static int convert_exec_to_group(const char *exec, char **result)
>  		goto out;
>  	}
>  
> -	for (ptr2 = ptr1; ptr2 != '\0'; ptr2++) {
> +	for (ptr2 = ptr1; *ptr2 != '\0'; ptr2++) {
>  		if (!isalnum(*ptr2) && *ptr2 != '_') {
>  			*ptr2 = '\0';
>  			break;
> -- 
> 2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ