Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70678
b: refs/heads/master
c: 80eb68d
h: refs/heads/master
v: v3
  • Loading branch information
Lepton Wu authored and Linus Torvalds committed Oct 17, 2007
1 parent baa13e4 commit 347dae1
Show file tree
Hide file tree
Showing 2 changed files with 11 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: a6cd6bf9f8cab154a4a086fe786bd7422954d8dc
refs/heads/master: 80eb68d23897126e7f25e2b3689bc27fb8cdde17
10 changes: 10 additions & 0 deletions trunk/fs/reiserfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ static int reiserfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
continue;
d_reclen = entry_length(bh, ih, entry_num);
d_name = B_I_DEH_ENTRY_FILE_NAME(bh, ih, deh);

if (d_reclen <= 0 ||
d_name + d_reclen > bh->b_data + bh->b_size) {
/* There is corrupted data in entry,
* We'd better stop here */
pathrelse(&path_to_entry);
ret = -EIO;
goto out;
}

if (!d_name[d_reclen - 1])
d_reclen = strlen(d_name);

Expand Down

0 comments on commit 347dae1

Please sign in to comment.