Skip to content
Snippets Groups Projects
Commit 0c392909 authored by Duncan Laurie's avatar Duncan Laurie Committed by Simon Glass
Browse files

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: default avatarDuncan Laurie <dlaurie@chromium.org>
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 984d8b09
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment