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: <87oaxh6bps.fsf@sejong.aot.lge.com>
Date:	Wed, 25 Jun 2014 10:04:47 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
Cc:	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Jiri Olsa <jolsa@...hat.com>,
	Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@...achi.com>,
	Howard Cochran <hcochran@...mark.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tools: lib: traceevent: event-parse.c:  Fix a risk for doing free on uninitialized pointer

Hi Rickard,

On Tue, 24 Jun 2014 13:09:10 +0200, Rickard Strandqvist wrote:
> Fix a risk of doing free on an uninitialized pointer.
>
> This was found using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>

Acked-by: Namhyung Kim <namhyung@...nel.org>

Thanks,
Namhyung


> ---
>  tools/lib/traceevent/event-parse.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> index b83184f..857675e 100644
> --- a/tools/lib/traceevent/event-parse.c
> +++ b/tools/lib/traceevent/event-parse.c
> @@ -2390,7 +2390,7 @@ process_flags(struct event_format *event, struct print_arg *arg, char **tok)
>  {
>  	struct print_arg *field;
>  	enum event_type type;
> -	char *token;
> +	char *token = NULL;
>  
>  	memset(arg, 0, sizeof(*arg));
>  	arg->type = PRINT_FLAGS;
> @@ -2443,7 +2443,7 @@ process_symbols(struct event_format *event, struct print_arg *arg, char **tok)
>  {
>  	struct print_arg *field;
>  	enum event_type type;
> -	char *token;
> +	char *token = NULL;
>  
>  	memset(arg, 0, sizeof(*arg));
>  	arg->type = PRINT_SYMBOL;
> @@ -2482,7 +2482,7 @@ process_hex(struct event_format *event, struct print_arg *arg, char **tok)
>  {
>  	struct print_arg *field;
>  	enum event_type type;
> -	char *token;
> +	char *token = NULL;
>  
>  	memset(arg, 0, sizeof(*arg));
>  	arg->type = PRINT_HEX;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ