diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/hfs/catalog.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/hfs/catalog.c b/fs/hfs/catalog.c index ba851576ebb1..6d98f116ca03 100644 --- a/fs/hfs/catalog.c +++ b/fs/hfs/catalog.c | |||
@@ -190,6 +190,10 @@ int hfs_cat_find_brec(struct super_block *sb, u32 cnid, | |||
190 | 190 | ||
191 | fd->search_key->cat.ParID = rec.thread.ParID; | 191 | fd->search_key->cat.ParID = rec.thread.ParID; |
192 | len = fd->search_key->cat.CName.len = rec.thread.CName.len; | 192 | len = fd->search_key->cat.CName.len = rec.thread.CName.len; |
193 | if (len > HFS_NAMELEN) { | ||
194 | printk(KERN_ERR "hfs: bad catalog namelength\n"); | ||
195 | return -EIO; | ||
196 | } | ||
193 | memcpy(fd->search_key->cat.CName.name, rec.thread.CName.name, len); | 197 | memcpy(fd->search_key->cat.CName.name, rec.thread.CName.name, len); |
194 | return hfs_brec_find(fd); | 198 | return hfs_brec_find(fd); |
195 | } | 199 | } |