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: <5877520.Sj6Wky7ff7@wuerfel>
Date:   Tue, 29 Nov 2016 12:15:38 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Maninder Singh <maninder1.s@...sung.com>
Cc:     robh+dt@...nel.org, rowand.list@...il.com,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        v.narang@...sung.com, pankaj.m@...sung.com, ajeet.y@...sung.com
Subject: Re: [PATCH 1/1] scripts: Fixing NULL pointer dereference when pos->file is NULL

On Tuesday, November 29, 2016 4:04:59 PM CET Maninder Singh wrote:
> This patch fixes NULL pointer dereference when pos->file is NULL.
> 
> caught with static analysis tool.
> Signed-off-by: Maninder Singh <maninder1.s@...sung.com>
> Signed-off-by: Vaneet Narang <v.narang@...sung.com>
> ---
>  scripts/dtc/srcpos.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/scripts/dtc/srcpos.c b/scripts/dtc/srcpos.c
> index f534c22..360fd14 100644
> --- a/scripts/dtc/srcpos.c
> +++ b/scripts/dtc/srcpos.c
> @@ -252,12 +252,11 @@ struct srcpos *
>  srcpos_dump(struct srcpos *pos)
>  {
>         printf("file        : \"%s\"\n",
> -              pos->file ? (char *) pos->file : "<no file>");
> +              pos->file ?  pos->file->name : "<no file>");
>         printf("first_line  : %d\n", pos->first_line);
> 

The patch looks right, but the description doesn't seem to
match the bug.

	Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ