mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
mtd: mxc_nand: fix read past buffer end
Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Sascha hauer <s.hauer@pengutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
74f1b7244e
commit
5d9d993620
@ -641,9 +641,9 @@ static void mxc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
|
||||
|
||||
n = min(n, len);
|
||||
|
||||
memcpy(buf, host->data_buf + col, len);
|
||||
memcpy(buf, host->data_buf + col, n);
|
||||
|
||||
host->buf_start += len;
|
||||
host->buf_start += n;
|
||||
}
|
||||
|
||||
/* Used by the upper layer to verify the data in NAND Flash
|
||||
|
Loading…
Reference in New Issue
Block a user