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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 05 Dec 2013 22:24:39 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Wang Weidong <wangweidong1@...wei.com>
Cc:	David Miller <davem@...emloft.net>, edumazet@...gle.com,
	ebiederm@...ssion.com, gaofeng@...fujitsu.com,
	jacob.e.keller@...el.com, netdev@...r.kernel.org
Subject: Re: [PATCH] unix: fix build warning of used uninitialized variable

On Fri, 2013-12-06 at 14:05 +0800, Wang Weidong wrote:
> af_unix.c: In function unix_bind
> af_unix.c:893: warning: path may be used uninitialized in this function
> 
> Signed-off-by: Wang Weidong <wangweidong1@...wei.com>
> ---
>  net/unix/af_unix.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> index 01625cc..4155ed3 100644
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c
> @@ -893,6 +893,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
>  		struct path path;
>  		umode_t mode = S_IFSOCK |
>  		       (SOCK_INODE(sock)->i_mode & ~current_umask());
> +		memset(&path, 0, sizeof(path));
>  		err = unix_mknod(sun_path, mode, &path);
>  		if (err) {
>  			if (err == -EEXIST)

You should update your compiler, this patch is not needed.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ