diff options
Diffstat (limited to 'fs/hfs')
-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 ba85157..6d98f11 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, fd->search_key->cat.ParID = rec.thread.ParID; len = fd->search_key->cat.CName.len = rec.thread.CName.len; + if (len > HFS_NAMELEN) { + printk(KERN_ERR "hfs: bad catalog namelength\n"); + return -EIO; + } memcpy(fd->search_key->cat.CName.name, rec.thread.CName.name, len); return hfs_brec_find(fd); } |