Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35558 )
Change subject: device/dram/ddr4: Check spd_bytes_total and spd_bytes_used values ......................................................................
Patch Set 9:
(2 comments)
https://review.coreboot.org/c/coreboot/+/35558/1/src/device/dram/ddr4.c File src/device/dram/ddr4.c:
https://review.coreboot.org/c/coreboot/+/35558/1/src/device/dram/ddr4.c@127 PS1, Line 127: if (spd_bytes_used > 4)
that causes an out of bound access. Better return here.
Done
https://review.coreboot.org/c/coreboot/+/35558/9/src/device/dram/ddr4.c File src/device/dram/ddr4.c:
https://review.coreboot.org/c/coreboot/+/35558/9/src/device/dram/ddr4.c@132 PS9, Line 132: spd_bytes_used = spd_bytes_used_table[spd_bytes_used]; Could turn this into a calculation, too. It's `x * 128`, isn't it?