Skip to content

Conversation

@molecula2788
Copy link

This is a classic bug where the size of a pointer is allocated, instead of the size of the underlying structure.

@dledda-r7
Copy link
Contributor

@molecula2788 good catch, i have noticed it couple of months ago and is currently fixed here: #764

However I'll probably go ahead and land this before and rebase the other PR as this should require non-testing. Thanks for opening this PR. Cheers

}

pNtDll = (NtDll*)HeapAlloc(hHeap, HEAP_ZERO_MEMORY, sizeof(pNtDll));
pNtDll = (NtDll*)HeapAlloc(hHeap, HEAP_ZERO_MEMORY, sizeof(*pNtDll));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pNtDll = (NtDll*)HeapAlloc(hHeap, HEAP_ZERO_MEMORY, sizeof(*pNtDll));
pNtDll = (NtDll*)HeapAlloc(hHeap, HEAP_ZERO_MEMORY, sizeof(NtDll));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants