[OpenBIOS] r139 - openbios-devel/kernel
svn at openbios.org
svn at openbios.org
Sat May 5 12:03:56 CEST 2007
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);
More information about the OpenBIOS
mailing list