From 551a0986d696a51420305131c7be76243b3b6e22 Mon Sep 17 00:00:00 2001 From: radare Date: Tue, 14 Jan 2020 14:36:45 +0100 Subject: [PATCH] 'push rip' is not a valid instruction ##asm (#15804) --- libr/asm/p/asm_x86_nz.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libr/asm/p/asm_x86_nz.c b/libr/asm/p/asm_x86_nz.c index 211c8c24a1..3e223771a5 100644 --- a/libr/asm/p/asm_x86_nz.c +++ b/libr/asm/p/asm_x86_nz.c @@ -2364,6 +2364,10 @@ static int oppush(RAsm *a, ut8 *data, const Opcode *op) { data[l++] = 0x41; } ut8 base = 0x50; + if (op->operands[0].reg == X86R_RIP) { + eprintf ("Invalid register\n"); + return -1; + } data[l++] = base + op->operands[0].reg; } } else if (op->operands[0].type & OT_MEMORY) {