Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2555
b: refs/heads/master
c: e595447
h: refs/heads/master
i:
  2553: 0878430
  2551: c8b3c19
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Jun 22, 2005
1 parent 7419b7c commit 6735fd5
Show file tree
Hide file tree
Showing 2 changed files with 14 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: 9eb7f2c67c41d2cd730aedcd23e5baca09211d03
refs/heads/master: e595447e177b39aa6c96baaa57b30cde2d8b9df7
13 changes: 13 additions & 0 deletions trunk/fs/isofs/rock.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,22 @@ static void init_rock_state(struct rock_state *rs, struct inode *inode)
static int rock_continue(struct rock_state *rs)
{
int ret = 1;
int blocksize = 1 << rs->inode->i_blkbits;
const int min_de_size = offsetof(struct rock_ridge, u);

kfree(rs->buffer);
rs->buffer = NULL;

if ((unsigned)rs->cont_offset > blocksize - min_de_size ||
(unsigned)rs->cont_size > blocksize ||
(unsigned)(rs->cont_offset + rs->cont_size) > blocksize) {
printk(KERN_NOTICE "rock: corrupted directory entry. "
"extent=%d, offset=%d, size=%d\n",
rs->cont_extent, rs->cont_offset, rs->cont_size);
ret = -EIO;
goto out;
}

if (rs->cont_extent) {
struct buffer_head *bh;

Expand Down

0 comments on commit 6735fd5

Please sign in to comment.