mmc: Avoid buffer overrun in mmc_startup()
If the CSD register contains a reserved value (4 - 7) in bits 0:2 of the
TRAN_SPEED field, a buffer overrun occurs. Resize the mapping table.
According to the original report
https://lore.kernel.org/u-boot/
20180826231332[email protected]/
reserved values have been observed resulting in a buffer overrun.
Reported-by: Eugeniu Rosca <[email protected]>
Fixes: 272cc70b211e ("Add MMC Framework")
Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Jaehoon Chung <[email protected]>