wargio / r2dec-js

radare2 plugin - converts asm to pseudo-C code.
514 stars 50 forks source link

Wrong input arguments #153

Closed enovella closed 5 years ago

enovella commented 5 years ago

Describe the bug Wrong arguments

Reproduce via JSON (pddi)

r2dec

eax = 0x200;
eax = 5;
rax = memmem (big, eax, "nedle", eax);

Hexrays

if ( memmem(&v5, 512, "nedle", 5) )

Ghidra

pVar2 = memmem(acStack552,0x200,"nedle",5);

Source code

#define MAX_LINE 512
if (memmem(line, MAX_LINE, "nedle", 5)) {
wargio commented 5 years ago

same bin as last time?

enovella commented 5 years ago

yes

wargio commented 5 years ago

fixed via https://github.com/wargio/r2dec-js/commit/ae909690489593fa43651f8591cc471b8604bf48