Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mach_override.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--mach_inject/mach_inject.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index db2a4b7..a50d024 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@ build
!default.perspectivev3
!default.mode1v3
!default.mode2v3
+xcuserdata
*~.nib
*~.xib
diff --git a/mach_inject/mach_inject.c b/mach_inject/mach_inject.c
index 6bb9f61..f0e0c29 100644
--- a/mach_inject/mach_inject.c
+++ b/mach_inject/mach_inject.c
@@ -97,9 +97,7 @@ mach_inject(
vm_address_t remoteCode = (vm_address_t)NULL;
if( !err )
err = vm_allocate( remoteTask, &remoteCode, imageSize, 1 );
-#if defined(__x86_64__)
err = vm_protect(remoteTask, remoteCode, imageSize, 0, VM_PROT_EXECUTE | VM_PROT_WRITE | VM_PROT_READ);
-#endif
if( !err ) {
ASSERT_CAST( pointer_t, image );
#if defined (__ppc__) || defined (__ppc64__) || defined(__x86_64__)
@@ -135,8 +133,10 @@ mach_inject(
#if defined(__x86_64__)
imageOffset = 0; // RIP-relative addressing
#else
- ASSERT_CAST( void*, remoteCode );
- imageOffset = ((void*) remoteCode) - image;
+ //ASSERT_CAST( void*, remoteCode );
+ //imageOffset = ((void*) remoteCode) - image;
+ // WARNING: See bug https://github.com/rentzsch/mach_star/issues/11 . Not sure about this.
+ imageOffset = 0;
#endif
}