Commit 5d9d9936 authored by Baruch Siach's avatar Baruch Siach Committed by David Woodhouse

mtd: mxc_nand: fix read past buffer end

Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
Acked-by: default avatarSascha hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 74f1b724
...@@ -641,9 +641,9 @@ static void mxc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) ...@@ -641,9 +641,9 @@ static void mxc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
n = min(n, 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 /* Used by the upper layer to verify the data in NAND Flash
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment