On Fri, 2021-02-12 at 10:40:22 UTC, "Gustavo A. R. Silva" wrote:
> Cast &data to (char *) in order to avoid unintentionally accessing
> the stack.
> 
> Notice that data is of type u32, so any increment to &data
> will be in the order of 4-byte chunks, and this piece of code
> is actually intended to be a byte offset.
> 
> Fixes: b3e79e7682e0 ("mtd: physmap: Add Baikal-T1 physically mapped ROM 
> support")
> Addresses-Coverity-ID: 1497765 ("Out-of-bounds access")
> Cc: sta...@vger.kernel.org
> Signed-off-by: Gustavo A. R. Silva <gustavo...@kernel.org>
> Acked-by: Serge Semin <fancer.lan...@gmail.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git 
mtd/next, thanks.

Miquel

Reply via email to