mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
x86: Fix off-by-one error in do_elf_reloc_fixups()
The use of post-increment with a do-while loop results in the loop going one step too far when handling relocation fixups. In about 1/100 cases this would cause it to hang. Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
984d8b09fb
commit
0c3929092d
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ int do_elf_reloc_fixups(void)
|
|||
*offset_ptr_ram += gd->reloc_off;
|
||||
}
|
||||
}
|
||||
} while (re_src++ < re_end);
|
||||
} while (++re_src < re_end);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue