j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: 2007-05-05 12:03:56 +0200 (Sat, 05 May 2007) New Revision: 139
Modified: openbios-devel/kernel/bootstrap.c Log: Fix memory corruption problems reported by glibc
Modified: openbios-devel/kernel/bootstrap.c =================================================================== --- openbios-devel/kernel/bootstrap.c 2007-05-04 20:55:05 UTC (rev 138) +++ openbios-devel/kernel/bootstrap.c 2007-05-05 10:03:56 UTC (rev 139) @@ -106,11 +106,11 @@ int l=(length+(sizeof(cell)-1))/sizeof(ucell), i; /* prepare relocation table */ - relocation_length=(l+BITS-1)/BITS; + relocation_length=(length+BITS-1)/BITS; reloc_table = malloc(relocation_length*sizeof(cell)); memset(reloc_table,0,relocation_length*sizeof(cell)); - for (i=0; i<=l; i++) { + for (i=0; i<l; i++) { pos=i/BITS; bit=i&~(-BITS);