Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 49140
b: refs/heads/master
c: 52e4200
h: refs/heads/master
v: v3
  • Loading branch information
Adrian Hunter authored and Kyungmin Park committed Feb 6, 2007
1 parent 5a9238c commit 426a01b
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 5b4246f1b089746703287fdf422cf15c6d6eff05
refs/heads/master: 52e4200a6da2d98c537b95f7c502ddadf96a6934
7 changes: 7 additions & 0 deletions trunk/drivers/mtd/onenand/onenand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,13 @@ static int onenand_do_write_oob(struct mtd_info *mtd, loff_t to, size_t len,
return -EINVAL;
}

/* For compatibility with NAND: Do not allow write past end of page */
if (column + len > oobsize) {
DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_oob: "
"Attempt to write past end of page\n");
return -EINVAL;
}

/* Do not allow reads past end of device */
if (unlikely(to >= mtd->size ||
column + len > ((mtd->size >> this->page_shift) -
Expand Down

0 comments on commit 426a01b

Please sign in to comment.