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>] [day] [month] [year] [list]
Date:	Mon, 25 Oct 2010 01:05:02 +0100
From:	Phillip Lougher <phillip@...gher.demon.co.uk>
To:	Linux Kernel Development <linux-kernel@...r.kernel.org>,
	linux-fsdevel@...r.kernel.org
Subject: [PATCH 1/2] Squashfs: fix use of __le64 annotated variable


This fixes a sparse with endian checking warning.

Signed-off-by: Phillip Lougher <phillip@...gher.demon.co.uk>
---
  fs/squashfs/xattr.c |    9 +++++----
  1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/fs/squashfs/xattr.c b/fs/squashfs/xattr.c
index 652b854..3876c36 100644
--- a/fs/squashfs/xattr.c
+++ b/fs/squashfs/xattr.c
@@ -158,17 +158,18 @@ static int squashfs_xattr_get(struct inode *inode, int name_index,
  					strncmp(target, name, name_size) == 0) {
  			/* found xattr */
  			if (type & SQUASHFS_XATTR_VALUE_OOL) {
-				__le64 xattr;
+				__le64 xattr_val;
+				u64 xattr;
  				/* val is a reference to the real location */
  				err = squashfs_read_metadata(sb, &val, &start,
  						&offset, sizeof(val));
  				if (err < 0)
  					goto failed;
-				err = squashfs_read_metadata(sb, &xattr, &start,
-					 &offset, sizeof(xattr));
+				err = squashfs_read_metadata(sb, &xattr_val,
+					&start, &offset, sizeof(xattr_val));
  				if (err < 0)
  					goto failed;
-				xattr = le64_to_cpu(xattr);
+				xattr = le64_to_cpu(xattr_val);
  				start = SQUASHFS_XATTR_BLK(xattr) +
  							msblk->xattr_table;
  				offset = SQUASHFS_XATTR_OFFSET(xattr);
-- 
1.6.3.3

--
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