From 5167f7b5dd515716b1330c5b701c15cd4dcb237c Mon Sep 17 00:00:00 2001 From: szaka Date: Mon, 22 Oct 2007 18:51:20 +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 537d05ae..1b6fcaaa 100644 --- a/libntfs-3g/security.c +++ b/libntfs-3g/security.c @@ -504,8 +504,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); }