summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2010-11-06 23:04:12 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2010-11-06 23:08:11 +0300
commit9f135edde97455d6e50417517dd52c4e7c06377a (patch)
tree87e24da2c2fde448a27d300935662ee5bb557e2b /eval.c
parentf0921a0c9c7ce7e2e89bdc617523e848ab290191 (diff)
downloadnasm-9f135edde97455d6e50417517dd52c4e7c06377a.tar.gz
nasm-9f135edde97455d6e50417517dd52c4e7c06377a.tar.bz2
nasm-9f135edde97455d6e50417517dd52c4e7c06377a.zip
eval: rexp3 should operate with 64bit numbers
reloc_value returns 64bit numbers but we strip it down to 'int' which causes problems if the former value is big enough to overflow 'int'. Fix it. [ BR3104312 ] Reported-by: Christian Masloch Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 76b0647..e526723 100644
--- a/eval.c
+++ b/eval.c
@@ -406,7 +406,7 @@ static expr *rexp3(int critical)
TOKEN_GE ? ">=" : ">"));
v = 0; /* must set it to _something_ */
} else {
- int vv = reloc_value(e);
+ int64_t vv = reloc_value(e);
if (vv == 0)
v = (j == TOKEN_LE || j == TOKEN_GE);
else if (vv > 0)