Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95101
b: refs/heads/master
c: 2deb1ac
h: refs/heads/master
i:
  95099: 6b64abe
v: v3
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Apr 30, 2008
1 parent 4053571 commit 3103189
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6bfe0b499082fd3950429017cd8ebf2a6c458aa5
refs/heads/master: 2deb1acc653cbd5384b107d050d2deba089db2bd
8 changes: 8 additions & 0 deletions trunk/fs/isofs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
}
de = tmpde;
}
/* Basic sanity check, whether name doesn't exceed dir entry */
if (de_len < de->name_len[0] +
sizeof(struct iso_directory_record)) {
printk(KERN_NOTICE "iso9660: Corrupted directory entry"
" in block %lu of inode %lu\n", block,
inode->i_ino);
return -EIO;
}

if (first_de) {
isofs_normalize_block_and_offset(de,
Expand Down
7 changes: 7 additions & 0 deletions trunk/fs/isofs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,

dlen = de->name_len[0];
dpnt = de->name;
/* Basic sanity check, whether name doesn't exceed dir entry */
if (de_len < dlen + sizeof(struct iso_directory_record)) {
printk(KERN_NOTICE "iso9660: Corrupted directory entry"
" in block %lu of inode %lu\n", block,
dir->i_ino);
return 0;
}

if (sbi->s_rock &&
((i = get_rock_ridge_filename(de, tmpname, dir)))) {
Expand Down

0 comments on commit 3103189

Please sign in to comment.