1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

Fix serious pointer bug with bootm and reserve map.

What was suppose to be a stack variable was declared as a pointer,
  overwriting random memory.
Also moved the libfdt.a requirement into the main Makefile.  That is
  The U-Boot Way.
This commit is contained in:
Gerald Van Baren
2007-04-19 23:14:39 -04:00
parent 37837828d8
commit 7651f8bdbb
3 changed files with 3 additions and 7 deletions

View File

@@ -56,7 +56,7 @@ int fdt_chosen(void *fdt, ulong initrd_start, ulong initrd_end, int force)
}
if (initrd_start && initrd_end) {
struct fdt_reserve_entry *re;
struct fdt_reserve_entry re;
int used;
int total;
int j;
@@ -77,7 +77,7 @@ int fdt_chosen(void *fdt, ulong initrd_start, ulong initrd_end, int force)
*/
for (j = 0; j < used; j++) {
err = fdt_get_reservemap(fdt, j, &re);
if (re->address == initrd_start) {
if (re.address == initrd_start) {
break;
}
}