]> git.baikalelectronics.ru Git - uboot.git/commit
common/memsize.c: Fix get_effective_memsize() to check for overflow
authorPali Rohár <pali@kernel.org>
Fri, 9 Sep 2022 15:32:39 +0000 (17:32 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 23 Sep 2022 19:11:13 +0000 (15:11 -0400)
commit9306ac3ce44bb291a1425248b95425b03aaf6a12
tree54d4c06f52dfcb11f56efb7d276e132c559c6127
parent4cff97a69fa362efdf53ac7d4302092a36178e58
common/memsize.c: Fix get_effective_memsize() to check for overflow

Ensure that top of RAM can be represented by phys_size_t type. If RAM is
too large or RAM base address is too upper then limit RAM size to prevent
address space overflow.

Signed-off-by: Pali Rohár <pali@kernel.org>
common/memsize.c