diff options
author | Baruch Siach <baruch@tkos.co.il> | 2011-03-02 16:47:55 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-03-11 14:22:49 +0000 |
commit | 5d9d9936209e589569a97985285b3282310cf2db (patch) | |
tree | 1884373cda9e914eb2252256ff603f6e2cb1c958 /drivers/mtd/nand | |
parent | 74f1b7244e502c5a98906a5dcc5ec389aacd25e6 (diff) | |
download | blackbird-op-linux-5d9d9936209e589569a97985285b3282310cf2db.tar.gz blackbird-op-linux-5d9d9936209e589569a97985285b3282310cf2db.zip |
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>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/mxc_nand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index ef932ba55a0b..6cd78ed439a7 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -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 |