Skip to content
Commit 325501d9 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Ulf Hansson
Browse files

mmc: dw_mmc-k3: Fix out-of-bounds access through DT alias



The hs_timing_cfg[] array is indexed using a value derived from the
"mshcN" alias in DT, which may lead to an out-of-bounds access.

Fix this by adding a range check.

Fixes: 361c7fe9 ("mmc: dw_mmc-k3: add sd support for hi3660")
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarShawn Lin <shawn.lin@rock-chips.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent f8870ae6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment