mtd/nand_imx: fix read past buffer end
Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
88415af7d5
commit
79c78016c1
|
@ -578,9 +578,9 @@ static void imx_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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue