mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-17 15:27:00 +00:00
imx8mn: buffer overflow in low_drive_gpu_freq()
Avoid a buffer overflow if assigned-clock-rates has less than two elements.
Fixes: 98bcdf1635
("imx8mn: Add low drive mode support for DDR4/LPDDR4 EVK")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
b016fcf723
commit
76ce66408d
1 changed files with 2 additions and 0 deletions
|
@ -914,6 +914,8 @@ static int low_drive_gpu_freq(void *blob)
|
|||
|
||||
if (cnt != 7)
|
||||
printf("Warning: %s, assigned-clock-rates count %d\n", nodes_path_8mn[0], cnt);
|
||||
if (cnt < 2)
|
||||
return -1;
|
||||
|
||||
assignedclks[cnt - 1] = 200000000;
|
||||
assignedclks[cnt - 2] = 200000000;
|
||||
|
|
Loading…
Add table
Reference in a new issue