From: nasm-bot f. C. G. <gor...@gm...> - 2015-05-09 15:09:31
|
Commit-ID: 4920a0324348716d6ab5106e65508496241dc7a2 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=4920a0324348716d6ab5106e65508496241dc7a2 Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sat, 9 May 2015 18:07:47 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sat, 9 May 2015 18:07:47 +0300 output: outmac64 -- Fix the case when first hit matches the symbol In case if we're looking up for a symbol and it's first one in symbol table we might endup with error because of using GE here (78f477b35f) ending cycle with @nearest = NULL. http://bugzilla.nasm.us/show_bug.cgi?id=3392306 Reprted-by: Benjamin Randazzo <ben...@li...> Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- output/outmac64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/outmac64.c b/output/outmac64.c index c07dcbc..1d30e64 100644 --- a/output/outmac64.c +++ b/output/outmac64.c @@ -304,7 +304,7 @@ static struct symbol *get_closest_section_symbol_by_offset(uint8_t fileindex, in for (sym = syms; sym; sym = sym->next) { if ((sym->sect != NO_SECT) && (sym->sect == fileindex)) { - if ((int64_t)sym->value >= offset) + if ((int64_t)sym->value > offset) break; nearest = sym; } |