avoid infinite loop while kext patch

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2020-04-26 08:32:48 +03:00
parent 773bb86427
commit 5eef6624f1

View File

@ -1010,6 +1010,10 @@ VOID AnyKextPatch(UINT8 *Driver, UINT32 DriverSize, CHAR8 *InfoPlist, UINT32 Inf
j += Entry->KernelAndKextPatches->KextPatches[N].SearchLen - 1;
}
}
if (!Entry->KernelAndKextPatches->KextPatches[i].StartPattern ||
!Entry->KernelAndKextPatches->KextPatches[i].StartPatternLen) {
break;
}
j++; curs++;
}
} else {