Skip to content
Commit c797bd81 authored by Tudor.Ambarus@microchip.com's avatar Tudor.Ambarus@microchip.com Committed by Boris Brezillon
Browse files

mtd: spi-nor: fix iteration over smpt array



Iterate over smpt array using its starting address and length
instead of the blind iterations that used data found in the array.

This prevents possible memory accesses outside of the smpt array
boundaries in case software, or manufacturers, misrepresent smpt
array fields.

Fixes: b038e8e3 ("mtd: spi-nor: parse SFDP Sector Map Parameter Table")
Suggested-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
parent cd5e6d79
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment