How to go to a location with pointer addition and change the pointer at that position to point to a new address?
The following code is just an example, I do not want an easy way as just do ptr[1] = (new addr)
but to change the address with the following method:
change_ptr
int *ptr[5];
void *change_addr = ptr[0];
void *p = change_ptr + sizeof(int*);
*p = (void*)(uintptr_t)(new address);
found out i just need to just void **
and dereference it to change address
int *ptr[5];
void *change_addr = ptr[0];
void **p = (void**)( change_ptr + sizeof(int*) );
*p = (void*)(uintptr_t)(new address);