Fixed: comparison in gadget search for gadgets with null character

This commit is contained in:
cao
2013-05-01 22:50:17 -07:00
parent 568244380f
commit ec2602abf3
+1 -1
View File
@@ -96,7 +96,7 @@ static void find_all_gadgets(t_binary *bin, t_asm *gadgets, unsigned int *NbGadF
/* opcode mode */
if (opcode_mode.flag)
{
if(!strncmp((char *)data, (char *)opcode_mode.opcode, opcode_mode.size))
if(!memcmp((char *)data, (char *)opcode_mode.opcode, opcode_mode.size))
{
uprintf("%s" ADDR_FORMAT "%s: \"%s", RED, ADDR_WIDTH, v_addr, ENDC, GREEN);
print_opcode();