brec.c (c2b3e1f76e5c90215bc7f740b376c0220eb8a8e3) brec.c (d614267329f2bee7a082ed8781c581c0f3aaa808)
1/*
2 * linux/fs/hfsplus/brec.c
3 *
4 * Copyright (C) 2001
5 * Brad Boyer (flar@allandria.com)
6 * (C) 2003 Ardis Technologies <roman@ardistech.com>
7 *
8 * Handle individual btree records

--- 31 unchanged lines hidden (view full) ---

40 (node->tree->cnid != HFSPLUS_ATTR_CNID)) {
41 retval = node->tree->max_key_len + 2;
42 } else {
43 recoff = hfs_bnode_read_u16(node,
44 node->tree->node_size - (rec + 1) * 2);
45 if (!recoff)
46 return 0;
47 if (recoff > node->tree->node_size - 2) {
1/*
2 * linux/fs/hfsplus/brec.c
3 *
4 * Copyright (C) 2001
5 * Brad Boyer (flar@allandria.com)
6 * (C) 2003 Ardis Technologies <roman@ardistech.com>
7 *
8 * Handle individual btree records

--- 31 unchanged lines hidden (view full) ---

40 (node->tree->cnid != HFSPLUS_ATTR_CNID)) {
41 retval = node->tree->max_key_len + 2;
42 } else {
43 recoff = hfs_bnode_read_u16(node,
44 node->tree->node_size - (rec + 1) * 2);
45 if (!recoff)
46 return 0;
47 if (recoff > node->tree->node_size - 2) {
48 printk(KERN_ERR "hfs: recoff %d too large\n", recoff);
48 pr_err("recoff %d too large\n", recoff);
49 return 0;
50 }
51
52 retval = hfs_bnode_read_u16(node, recoff) + 2;
53 if (retval > node->tree->max_key_len + 2) {
49 return 0;
50 }
51
52 retval = hfs_bnode_read_u16(node, recoff) + 2;
53 if (retval > node->tree->max_key_len + 2) {
54 printk(KERN_ERR "hfs: keylen %d too large\n",
54 pr_err("keylen %d too large\n",
55 retval);
56 retval = 0;
57 }
58 }
59 return retval;
60}
61
62int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len)

--- 463 unchanged lines hidden ---
55 retval);
56 retval = 0;
57 }
58 }
59 return retval;
60}
61
62int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len)

--- 463 unchanged lines hidden ---