ensure shared t700{0,1} length at least 0xaa4

This commit is contained in:
Nick Chan committed 2026-05-26 20:21:57 +08:00
1 parent 0c5c108f87
commit 706dd94b55
2 files changed
+10 -2

No files matched your search

+5 -1
View File
@@ -51,7 +51,11 @@ void setup_hooks_arm64(void *stream)
assert(vm_protect(mach_task_self(), page, 0x4000, false, VM_PROT_READ | VM_PROT_WRITE | VM_PROT_COPY) == 0);
patch(t7000_patch_base, t7000_bin, t7000_bin_len);
uint32_t t7000_shared_len = 0xaa4; // shared with T7001
if (t7000_bin_len > t7000_shared_len)
t7000_shared_len = t7000_bin_len;
patch(t7000_patch_base, t7000_bin, t7000_shared_len);
patch(t8011_patch_base, t8011_bin, t8011_bin_len);
patch(t8012_patch_base, t8012_bin, t8012_bin_len);
+5 -1
View File
@@ -57,7 +57,11 @@ void setup_hooks_x86_64(void *stream)
assert(vm_protect(mach_task_self(), page, 0x1000, false, VM_PROT_READ | VM_PROT_WRITE | VM_PROT_COPY) == 0);
patch(t7000_patch_base, t7000_bin, t7000_bin_len);
uint32_t t7000_shared_len = 0xaa4; // shared with T7001
if (t7000_bin_len > t7000_shared_len)
t7000_shared_len = t7000_bin_len;
patch(t7000_patch_base, t7000_bin, t7000_shared_len);
patch(t8011_patch_base, t8011_bin, t8011_bin_len);
patch(t8012_patch_base, t8012_bin, t8012_bin_len);