projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6eebee6
)
ext4: add check for wraparound in ext4_data_block_valid()
author
Theodore Ts'o
<tytso@mit.edu>
Mon, 23 Nov 2009 01:48:34 +0000
(20:48 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Mon, 23 Nov 2009 01:48:34 +0000
(20:48 -0500)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/block_validity.c
patch
|
blob
|
history
diff --git
a/fs/ext4/block_validity.c
b/fs/ext4/block_validity.c
index dc79b75d8f70f4e234af51a2d27789167d7f4bf4..4df8621ec31cff1f5c8eef0211942750b92fd009 100644
(file)
--- a/
fs/ext4/block_validity.c
+++ b/
fs/ext4/block_validity.c
@@
-228,6
+228,7
@@
int ext4_data_block_valid(struct ext4_sb_info *sbi, ext4_fsblk_t start_blk,
struct rb_node *n = sbi->system_blks.rb_node;
if ((start_blk <= le32_to_cpu(sbi->s_es->s_first_data_block)) ||
+ (start_blk + count < start_blk) ||
(start_blk + count > ext4_blocks_count(sbi->s_es)))
return 0;
while (n) {