qilingframework / qiling

A True Instrumentable Binary Emulation Framework
https://qiling.io
GNU General Public License v2.0
5.06k stars 737 forks source link

hook_HeapAlloc does not respect HEAP_ZERO_MEMORY #1436

Closed russdill closed 7 months ago

russdill commented 8 months ago

HeapAlloc isn't zero'ing memory from the heap before returning it when the HEAP_ZERO_MEMORY flag is passed.

https://learn.microsoft.com/en-us/windows/win32/api/heapapi/nf-heapapi-heapalloc

HEAP_ZERO_MEMORY 0x00000008 The allocated memory will be initialized to zero. Otherwise, the memory is not initialized to zero.

elicn commented 7 months ago

Should be fixed now. Please let us know if the problem persists.