Closed davemcincork closed 2 years ago
https://github.com/hasherezade/masm_shc/blob/05c71497225d132cbfa17a6f80ca61a711b8bf67/demos/peb_lookup.h#L83
if curr_module->BaseAddress is non-null and curr_module->BaseDllName.Buffer is null, the while loop goes infinite. Reason is that the advance to the next list item is skipped on continue. Suggest turning the while loop into a for loop, i.e.
curr_module->BaseAddress
curr_module->BaseDllName.Buffer
while
for
for ( PLDR_DATA_TABLE_ENTRY curr_module = Flink; curr_module && curr_module->BaseAddress; curr_module = (PLDR_DATA_TABLE_ENTRY)curr_module->InLoadOrderModuleList.Flink) {
Thank you, fixed!
https://github.com/hasherezade/masm_shc/blob/05c71497225d132cbfa17a6f80ca61a711b8bf67/demos/peb_lookup.h#L83
if
curr_module->BaseAddress
is non-null andcurr_module->BaseDllName.Buffer
is null, the while loop goes infinite. Reason is that the advance to the next list item is skipped on continue. Suggest turning thewhile
loop into afor
loop, i.e.