From 11dbdf51be73cda7f73a12071ab4074e4999b37b Mon Sep 17 00:00:00 2001 From: szaka Date: Mon, 22 Oct 2007 18:50:01 +0000 Subject: [PATCH] ntfs_security_hash(): big-endian fix (Erik Larsson) --- libntfs-3g/security.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libntfs-3g/security.c b/libntfs-3g/security.c index 489edc65..4b54b699 100644 --- a/libntfs-3g/security.c +++ b/libntfs-3g/security.c @@ -361,8 +361,10 @@ le32 ntfs_security_hash(const SECURITY_DESCRIPTOR_RELATIVE *sd, const u32 len) const le32 *end = pos + (len >> 2); u32 hash = 0; - while (pos < end) - hash = le32_to_cpup(pos++) + ntfs_rol32(hash, 3); + while (pos < end) { + hash = le32_to_cpup(pos) + ntfs_rol32(hash, 3); + pos++; + } return cpu_to_le32(hash); }