aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hfsplus')
-rw-r--r--fs/hfsplus/brec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/hfsplus/brec.c b/fs/hfsplus/brec.c
index 2312de34bd42..2a734cfccc92 100644
--- a/fs/hfsplus/brec.c
+++ b/fs/hfsplus/brec.c
@@ -43,6 +43,10 @@ u16 hfs_brec_keylen(struct hfs_bnode *node, u16 rec)
43 node->tree->node_size - (rec + 1) * 2); 43 node->tree->node_size - (rec + 1) * 2);
44 if (!recoff) 44 if (!recoff)
45 return 0; 45 return 0;
46 if (recoff > node->tree->node_size - 2) {
47 printk(KERN_ERR "hfs: recoff %d too large\n", recoff);
48 return 0;
49 }
46 50
47 retval = hfs_bnode_read_u16(node, recoff) + 2; 51 retval = hfs_bnode_read_u16(node, recoff) + 2;
48 if (retval > node->tree->max_key_len + 2) { 52 if (retval > node->tree->max_key_len + 2) {