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
* Patrick Georgi patrick@georgi-clan.de [070822 14:57]:
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);
I would think it should be
walk < (u32 *) (lar->map + offset + complen + hlen)
because temp was copied to lar->map + offset before.
But I agree this needs fixing:
Acked-by: Stefan Reinauer stepan@coresystems.de
On Thu, Aug 23, 2007 at 04:54:15PM +0200, Stefan Reinauer wrote:
But I agree this needs fixing:
Acked-by: Stefan Reinauer stepan@coresystems.de
r480.
Uwe.