]> granicus.if.org Git - yasm/commitdiff
Fix crash when possibly 32-bit 64-bit immediate is a weird absolute value.
authorPeter Johnson <peter@tortall.net>
Fri, 16 Feb 2007 08:02:33 +0000 (08:02 -0000)
committerPeter Johnson <peter@tortall.net>
Fri, 16 Feb 2007 08:02:33 +0000 (08:02 -0000)
svn path=/trunk/yasm/; revision=1772

modules/arch/x86/x86id.c

index 5353c4114bc976a55a9c8e30fc9690b557f07171..a1ada6be892c295ebfdf2ad27218b74abdf79e47 100644 (file)
@@ -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;