OcAppleKernelLib: Fix memory corruption with many kexts in 11.0

This commit is contained in:
vit9696 2020-07-18 04:40:37 +03:00
parent f1e8766af9
commit 32bf419136

View File

@ -201,7 +201,7 @@ KcRebuildMachHeader (
CurrentSize = MachHeader->CommandsSize + sizeof (*MachHeader);
FilesetSize = InternalKcGetKextFilesetSize (Context);
RequiredSize = FilesetSize + sizeof (MACH_LOAD_COMMAND_SEGMENT_64) + Context->PrelinkedInfoSegment->CommandSize;
RequiredSize = FilesetSize + sizeof (MACH_SEGMENT_COMMAND_64) + Context->PrelinkedInfoSegment->CommandSize;
TextSegment = MachoGetSegmentByName64 (
&Context->PrelinkedMachContext,