Hi,

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)

Attached patch should fix that, but I'd like to have someone look over it to
make sure it checksums the right area.


Regards,
Patrick Georgi
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 <[EMAIL PROTECTED]>

Index: util/lar/stream.c
===================================================================
--- util/lar/stream.c	(revision 478)
+++ util/lar/stream.c	(working copy)
@@ -666,7 +666,7 @@
 
 	csum = 0;
 	for (walk = (u32 *) (lar->map + offset);
-	     walk < (u32 *) (temp + complen + hlen);
+	     walk < (u32 *) (lar->map + complen + hlen);
 	     walk++) {
 		csum += ntohl(*walk);
 	}

-- 
linuxbios mailing list
linuxbios@linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

Reply via email to