The checksum creation in lar starts somewhere in the lar image,

and ends at the end of a temporary buffer, which doesn't look
right to me (and segfaults if between those two there's an unmapped
region, as happened here).

Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@480 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Uwe Hermann 2007-08-26 12:12:22 +00:00
parent d73c7038ba
commit eb1a12cf8d

View file

@ -666,7 +666,7 @@ int lar_add_file(struct lar *lar, const char *name)
csum = 0;
for (walk = (u32 *) (lar->map + offset);
walk < (u32 *) (temp + complen + hlen);
walk < (u32 *) (lar->map + complen + hlen);
walk++) {
csum += ntohl(*walk);
}