diff options
Diffstat (limited to 'fs/hfs/catalog.c')
-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 6d98f116ca03..424b0337f524 100644 --- a/fs/hfs/catalog.c +++ b/fs/hfs/catalog.c | |||
@@ -289,6 +289,10 @@ int hfs_cat_move(u32 cnid, struct inode *src_dir, struct qstr *src_name, | |||
289 | err = hfs_brec_find(&src_fd); | 289 | err = hfs_brec_find(&src_fd); |
290 | if (err) | 290 | if (err) |
291 | goto out; | 291 | goto out; |
292 | if (src_fd.entrylength > sizeof(entry) || src_fd.entrylength < 0) { | ||
293 | err = -EIO; | ||
294 | goto out; | ||
295 | } | ||
292 | 296 | ||
293 | hfs_bnode_read(src_fd.bnode, &entry, src_fd.entryoffset, | 297 | hfs_bnode_read(src_fd.bnode, &entry, src_fd.entryoffset, |
294 | src_fd.entrylength); | 298 | src_fd.entrylength); |