Skip to content

Commit

Permalink
btrfs-progs: Stop stomping on 'name' input parameter
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Chiang authored and Chris Mason committed Sep 25, 2008
1 parent 2b114d1 commit 140dfd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 == '.') {
Expand Down

0 comments on commit 140dfd0

Please sign in to comment.