mirror of
https://github.com/Adamcake/Bolt.git
synced 2026-05-24 17:14:28 -04:00
library: init zeroed memory in stub gen
I don't understand why this was necessary. C and C++ standards specify that this memory should be zeroed by virtue of it being static and constant, yet various different compilers produce various different errors about this line...
This commit is contained in:
@@ -70,7 +70,7 @@ int wmain(int argc, const wchar_t **argv) {
|
||||
std::cout << "};" << std::endl;
|
||||
}
|
||||
// embed the amount of zeroes we'll need (WriteProcessMemory needs actual memory to copy from)
|
||||
std::cout << "static const uint8_t zeroes[" << stub_nt_headers->OptionalHeader.SizeOfHeaders << "];" << std::endl;
|
||||
std::cout << "static constexpr uint8_t zeroes[" << stub_nt_headers->OptionalHeader.SizeOfHeaders << "] = {0};" << std::endl;
|
||||
|
||||
std::cout << "void InjectStub(HANDLE process) {" << std::endl;
|
||||
// allocate memory in the remote process
|
||||
|
||||
Reference in New Issue
Block a user