node(31132,0x7fff730ba300) malloc: *** mach_vm_map(size=2305843009230548992) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
for(it = TargetMACs->begin() ; it != TargetMACs->end() ; it++) {
if( (*it) == AttackerMAC ) {
it = TargetMACs->erase(it);
/* And erase it from IP list */
TargetIPs->erase(TargetIPs->begin() + count);
}
count++;
}
First iteration of loop is normal. When second iteration - it is out of memory.
I think that in an iterator just one element that we remove with the help of erase and then get out of memory when the second iteration
out of memory in code: https://github.com/pellegre/libcrafter/blob/master/libcrafter/crafter/Utils/ARPSpoofing.cpp#L81
First iteration of loop is normal. When second iteration -
it
is out of memory.I think that in an iterator just one element that we remove with the help of
erase
and then get out of memory when the second iteration