Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252081
b: refs/heads/master
c: 6f04864
h: refs/heads/master
i:
  252079: 8aaced3
v: v3
  • Loading branch information
Phillip Lougher committed May 25, 2011
1 parent 22d77f2 commit 2838962
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 76e002f755b61aa79228f4e751bbca8674aba0f6
refs/heads/master: 6f04864515365e135adc9f1cee4ac1251bb0ed35
11 changes: 11 additions & 0 deletions trunk/fs/squashfs/xattr_id.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ __le64 *squashfs_read_xattr_id_table(struct super_block *sb, u64 start,
*xattr_table_start = le64_to_cpu(id_table->xattr_table_start);
*xattr_ids = le32_to_cpu(id_table->xattr_ids);
kfree(id_table);

/* Sanity check values */

/* there is always at least one xattr id */
if (*xattr_ids == 0)
return ERR_PTR(-EINVAL);

/* xattr_table should be less than start */
if (*xattr_table_start >= start)
return ERR_PTR(-EINVAL);

len = SQUASHFS_XATTR_BLOCK_BYTES(*xattr_ids);

TRACE("In read_xattr_index_table, length %d\n", len);
Expand Down

0 comments on commit 2838962

Please sign in to comment.