* [PATCH] mtd/nand_imx: fix read past buffer end
@ 2011-03-17 8:59 Baruch Siach
0 siblings, 0 replies; only message in thread
From: Baruch Siach @ 2011-03-17 8:59 UTC (permalink / raw)
To: barebox
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
drivers/mtd/nand/nand_imx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/nand_imx.c b/drivers/mtd/nand/nand_imx.c
index 8bfa2ba..48841dc 100644
--- a/drivers/mtd/nand/nand_imx.c
+++ b/drivers/mtd/nand/nand_imx.c
@@ -566,9 +566,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;
}
/*
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-17 9:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-17 8:59 [PATCH] mtd/nand_imx: fix read past buffer end Baruch Siach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox