summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2015-05-09 18:07:47 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2015-05-09 18:07:47 +0300
commit4920a0324348716d6ab5106e65508496241dc7a2 (patch)
treed9beb02608c5b6421d3940b5d2873ce693b12fbc
parent1f0cb0f2c1ba632c0fab02424928cfb756a9160c (diff)
downloadnasm-4920a0324348716d6ab5106e65508496241dc7a2.tar.gz
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 <benjamin@linuxcrashing.org> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--output/outmac64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/output/outmac64.c b/output/outmac64.c
index c07dcbc9..1d30e648 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;
}