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: <1320672724-4432-4-git-send-email-wenqing.lz@taobao.com>
Date:	Mon,  7 Nov 2011 21:32:04 +0800
From:	Zheng Liu <gnehzuil.liu@...il.com>
To:	linux-ext4@...r.kernel.org
Cc:	Zheng Liu <wenqing.lz@...bao.com>
Subject: [PATCH 3/3] ext4: initialize 'error' variable in ext4_xattr_block_find()

From: Zheng Liu <wenqing.lz@...bao.com>

'error' variable is initialized to 0 to avoid a assignment in
ext4_xattr_block_find().

Signed-off-by: Zheng Liu <wenqing.lz@...bao.com>
---
 fs/ext4/xattr.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index e985864..bd67d0a 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -652,7 +652,7 @@ ext4_xattr_block_find(struct inode *inode, struct ext4_xattr_info *i,
 		      struct ext4_xattr_block_find *bs)
 {
 	struct super_block *sb = inode->i_sb;
-	int error;
+	int error = 0;
 
 	ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
 		  i->name_index, i->name, i->value, (long)i->value_len);
@@ -684,7 +684,6 @@ ext4_xattr_block_find(struct inode *inode, struct ext4_xattr_info *i,
 			goto cleanup;
 		bs->s.not_found = error;
 	}
-	error = 0;
 
 cleanup:
 	return error;
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" 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