From 3ea1f0fb45d5d3ec81370efc3c1c0759a4d88675 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 19 Jul 2002 22:30:37 -0400 Subject: [PATCH] dirhash.c (halfMD4Transform): Shift the hash by one bit, since that's required by the directory indexing code. --- lib/ext2fs/ChangeLog | 5 +++++ lib/ext2fs/dirhash.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index 5d154d0..711daa9 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,3 +1,8 @@ +2002-07-19 Theodore Ts'o + + * dirhash.c (halfMD4Transform): Shift the hash by one bit, + since that's required by the directory indexing code. + 2002-07-14 Theodore Ts'o * ext2fs.h, read_bb_file.c: Change private to priv_data, to avoid diff --git a/lib/ext2fs/dirhash.c b/lib/ext2fs/dirhash.c index 113d182..1d21fe5 100644 --- a/lib/ext2fs/dirhash.c +++ b/lib/ext2fs/dirhash.c @@ -75,7 +75,7 @@ static __u32 halfMD4Transform (__u32 buf[4], __u32 const in[]) buf[2] += c; buf[3] += d; - return buf[1]; /* "most hashed" word */ + return (buf[1] << 1); /* "most hashed" word */ /* Alternative: return sum of all words? */ } -- 1.8.3.1