Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105856
b: refs/heads/master
c: c0a1633
h: refs/heads/master
v: v3
  • Loading branch information
Adam Greenblatt authored and Linus Torvalds committed Jul 25, 2008
1 parent 8eb1b1a commit bf58cd7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 275c0a8f1253a7542ad9726956c918d8a1f694c4
refs/heads/master: c0a1633b6201ef79e31b7da464d44fdf5953054d
22 changes: 20 additions & 2 deletions trunk/fs/isofs/rock.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,24 @@ int get_rock_ridge_filename(struct iso_directory_record *de,

while (rs.len > 2) { /* There may be one byte for padding somewhere */
rr = (struct rock_ridge *)rs.chr;
/*
* Ignore rock ridge info if rr->len is out of range, but
* don't return -EIO because that would make the file
* invisible.
*/
if (rr->len < 3)
goto out; /* Something got screwed up here */
sig = isonum_721(rs.chr);
if (rock_check_overflow(&rs, sig))
goto eio;
rs.chr += rr->len;
rs.len -= rr->len;
/*
* As above, just ignore the rock ridge info if rr->len
* is bogus.
*/
if (rs.len < 0)
goto eio; /* corrupted isofs */
goto out; /* Something got screwed up here */

switch (sig) {
case SIG('R', 'R'):
Expand Down Expand Up @@ -307,15 +316,24 @@ parse_rock_ridge_inode_internal(struct iso_directory_record *de,
repeat:
while (rs.len > 2) { /* There may be one byte for padding somewhere */
rr = (struct rock_ridge *)rs.chr;
/*
* Ignore rock ridge info if rr->len is out of range, but
* don't return -EIO because that would make the file
* invisible.
*/
if (rr->len < 3)
goto out; /* Something got screwed up here */
sig = isonum_721(rs.chr);
if (rock_check_overflow(&rs, sig))
goto eio;
rs.chr += rr->len;
rs.len -= rr->len;
/*
* As above, just ignore the rock ridge info if rr->len
* is bogus.
*/
if (rs.len < 0)
goto eio; /* corrupted isofs */
goto out; /* Something got screwed up here */

switch (sig) {
#ifndef CONFIG_ZISOFS /* No flag for SF or ZF */
Expand Down

0 comments on commit bf58cd7

Please sign in to comment.