Ignore zero-length memory ranges.
This commit is contained in:
parent
cd403b1f05
commit
9e195f47c2
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-08-02 Gordon Matzigkeit <gord@fig.org>
|
||||
|
||||
* stage2/common.c (init_bios_info): Ignore zero-length memory
|
||||
ranges. From Derrik Pates.
|
||||
|
||||
2001-07-26 Jochen Hoenicke <jochen@gnu.org>
|
||||
|
||||
* stage2/Makefile.am (libgrub_a_CFLAGS): Enable USE_MD5_PASSWORDS
|
||||
|
|
|
@ -226,7 +226,7 @@ init_bios_info (void)
|
|||
{
|
||||
struct AddrRangeDesc *desc = (struct AddrRangeDesc *) addr;
|
||||
|
||||
if (desc->Type == MB_ARD_MEMORY
|
||||
if (desc->Type == MB_ARD_MEMORY && desc->Length > 0
|
||||
&& desc->BaseAddr + desc->Length > max_addr)
|
||||
max_addr = desc->BaseAddr + desc->Length;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue