From eb1a12cf8d414c9be4092f35ff53e8a87d9a5495 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sun, 26 Aug 2007 12:12:22 +0000 Subject: [PATCH] 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 Acked-by: Stefan Reinauer Acked-by: Uwe Hermann git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@480 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- util/lar/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/lar/stream.c b/util/lar/stream.c index 769abacc74..f862881c3f 100644 --- a/util/lar/stream.c +++ b/util/lar/stream.c @@ -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); }