Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165464
b: refs/heads/master
c: ebf2e93
h: refs/heads/master
v: v3
  • Loading branch information
Roel Kluin authored and David Woodhouse committed Sep 19, 2009
1 parent 0ecce88 commit a3715c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 4c1e6b2ce13b154a4a69cee220c98976f4b784df
refs/heads/master: ebf2e93036907fe2a7ddab942aa63d35f97f3b2b
6 changes: 3 additions & 3 deletions trunk/drivers/mtd/mtdconcat.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
* to-be-erased area begins. Verify that the starting
* offset is aligned to this region's erase size:
*/
if (instr->addr & (erase_regions[i].erasesize - 1))
if (i < 0 || instr->addr & (erase_regions[i].erasesize - 1))
return -EINVAL;

/*
Expand All @@ -440,8 +440,8 @@ static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
/*
* check if the ending offset is aligned to this region's erase size
*/
if ((instr->addr + instr->len) & (erase_regions[i].erasesize -
1))
if (i < 0 || ((instr->addr + instr->len) &
(erase_regions[i].erasesize - 1)))
return -EINVAL;
}

Expand Down

0 comments on commit a3715c5

Please sign in to comment.