Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

mtd: mxc_nand: fix read past buffer end

parent 74f1b724
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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