diff options
| author | WeiN76LQh <WeiN76LQh@github.com> | 2024-11-21 14:20:04 +0000 |
|---|---|---|
| committer | kat <kat@vector35.com> | 2024-12-10 12:16:37 -0500 |
| commit | 339339e2660014ece36608cf029fdbc059bf3e01 (patch) | |
| tree | 498e63aca84d3a37ed898b51e0582c008262b3c0 /view/sharedcache | |
| parent | 90bed479f1025263ca243f81c75e1327f1359c64 (diff) | |
[SharedCache] Fix padding issue with v5 slide info
The issue this commit fixes was causing `SharedCache::ParseAndApplySlideInfoForFile` to completely fail to work with v5 slide info, which had a lot of knock on effects, i.e. lots of Objective-C analysis was failing due to invalid pointers which hadn't been fixed up.
`dyld_cache_slide_info5` has 4 bytes of padding before `value_add`. Whilst `value_add` is not actually being read from, `SharedCache::ParseAndApplySlideInfoForFile` will read at a location in the file based on the size of the structure `dyld_cache_slide_info5`. This being off by 4 bytes basically broke v5 slide info fixups.
With this fix many more Objective-C functions have names and a lot more `msgSend` calls are fixed up.
Diffstat (limited to 'view/sharedcache')
| -rw-r--r-- | view/sharedcache/core/SharedCache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/view/sharedcache/core/SharedCache.h b/view/sharedcache/core/SharedCache.h index ac24b529..ae8e5e60 100644 --- a/view/sharedcache/core/SharedCache.h +++ b/view/sharedcache/core/SharedCache.h @@ -202,6 +202,7 @@ namespace SharedCacheCore { uint32_t version; // currently 5 uint32_t page_size; // currently 4096 (may also be 16384) uint32_t page_starts_count; + uint32_t pad; // padding to ensure the value below is on an 8-byte boundary uint64_t value_add; // uint16_t page_starts[/* page_starts_count */]; }; |
