Skip to content

Commit

Permalink
mtd: mxc_nand: fix read past buffer end
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Baruch Siach authored and David Woodhouse committed Mar 11, 2011
1 parent 74f1b72 commit 5d9d993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/nand/mxc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d9d993

Please sign in to comment.