diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2021-02-12 04:40:22 -0600 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-03-11 09:37:48 +0100 |
commit | 683313993dbe1651c7aa00bb42a041d70e914925 (patch) | |
tree | ef23c42d5405966142ffe87300f32ea64459d5d3 /include/linux/mtd | |
parent | a38fd8748464831584a19438cbb3082b5a2dab15 (diff) |
mtd: physmap: physmap-bt1-rom: Fix unintentional stack access
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: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210212104022.GA242669@embeddedor
Diffstat (limited to 'include/linux/mtd')
0 files changed, 0 insertions, 0 deletions