Fix 32-bit compilation failure

This commit is contained in:
Boring
2022-11-17 13:06:19 +08:00
parent a4bf9430d1
commit dcf5f3ccde
4 changed files with 11 additions and 9 deletions
+3 -2
View File
@@ -194,8 +194,9 @@ DWORD NTAPI MmpUserThreadStart(LPVOID lpThreadParameter) {
PTLS_ENTRY tls = CONTAINING_RECORD(entry, TLS_ENTRY, TlsEntryLinks);
auto len = tls->TlsDirectory.EndAddressOfRawData - tls->TlsDirectory.StartAddressOfRawData;
PVOID data = RtlAllocateHeap(RtlProcessHeap(), 0, len);
if (!len) {
PVOID data = len ? RtlAllocateHeap(RtlProcessHeap(), 0, len) : nullptr;
if (!data) {
RtlFreeHeap(RtlProcessHeap(), 0, data);
success = false;
break;
}