Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torvalds/linux.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorAlex Chiang <achiang@hp.com>2008-04-01 19:21:40 +0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 19:04:01 +0400
commit140dfd00ae544cdc0c9951b80ad6df61e62859e2 (patch)
treee6c505976629760f5d477bd5c1369acc0f2543c6 /fs/btrfs
parent2b114d1d33551ab1dcaa1d0b3a956df3776fb767 (diff)
btrfs-progs: Stop stomping on 'name' input parameter
In btrfs_name_hash, Local variable 'buf' is declared as __u32 buf[2]; but we then try to do this: buf[0] = 0x67452301; buf[1] = 0xefcdab89; buf[2] = 0x98badcfe; buf[3] = 0x10325476; Oops. Fix buf to be the proper size. Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/hash.c b/fs/btrfs/hash.c
index d5252f5c9d01..21037cfca9bd 100644
--- a/fs/btrfs/hash.c
+++ b/fs/btrfs/hash.c
@@ -81,7 +81,7 @@ u64 btrfs_name_hash(const char *name, int len)
__u32 hash;
__u32 minor_hash = 0;
const char *p;
- __u32 in[8], buf[2];
+ __u32 in[8], buf[4];
u64 hash_result;
if (len == 1 && *name == '.') {