From 2a04be1d05f419bbaa29c2d15a1bb5fb0e9fd80a Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Fri, 16 Feb 2007 08:02:33 +0000 Subject: [PATCH] Fix crash when possibly 32-bit 64-bit immediate is a weird absolute value. svn path=/trunk/yasm/; revision=1772 --- modules/arch/x86/x86id.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/arch/x86/x86id.c b/modules/arch/x86/x86id.c index 5353c411..a1ada6be 100644 --- a/modules/arch/x86/x86id.c +++ b/modules/arch/x86/x86id.c @@ -3045,8 +3045,9 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc, * byte of the opcode. */ if (!insn->imm->abs || - yasm_intnum_check_size( - yasm_expr_get_intnum(&insn->imm->abs, 0), 32, 0, 1)) { + (yasm_expr_get_intnum(&insn->imm->abs, 0) && + yasm_intnum_check_size( + yasm_expr_get_intnum(&insn->imm->abs, 0), 32, 0, 1))) { /* Throwaway REX byte */ unsigned char rex_temp = 0; -- 2.40.0