diff --git a/fs/hfs/bfind.c b/fs/hfs/bfind.c index ddabd9996575..48ff88b01262 100644 --- a/fs/hfs/bfind.c +++ b/fs/hfs/bfind.c @@ -23,7 +23,7 @@ int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) return -ENOMEM; fd->search_key = ptr; fd->key = ptr + tree->max_key_len + 2; - memset(fd->key, 0, sizeof(struct hfs_key)); + memset(fd->key, 0, tree->max_key_len); hfs_dbg(BNODE_REFS, "find_init: %d (%p)\n", tree->cnid, __builtin_return_address(0)); switch (tree->cnid) {