Skip to content

Commit 071dc43

Browse files
committed
Bugfix: notify_context comes as a list, not int
1 parent 7546dda commit 071dc43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

qiling/os/uefi/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ def __notify_next(ql: Qiling):
6767
def check_and_notify_protocols(ql: Qiling, from_hook: bool = False) -> bool:
6868
if ql.loader.notify_list:
6969
event_id, notify_func, notify_context = ql.loader.notify_list.pop(0)
70-
ql.log.info(f'Notify event: {event_id}, calling: {notify_func:#x} context: {notify_context:#x}')
70+
ql.log.info(f'Notify event: id = {event_id}, calling: {notify_func:#x} context: {notify_context}')
7171

7272
if from_hook:
7373
# When running from a hook the caller pops the return address from the stack.
7474
# We need to push the address to the stack as opposed to setting it to the instruction pointer.
75-
ql.loader.call_function(0, [notify_context], notify_func)
75+
ql.loader.call_function(0, notify_context, notify_func)
7676
else:
77-
ql.loader.call_function(notify_func, [notify_context], ql.loader.end_of_execution_ptr)
77+
ql.loader.call_function(notify_func, notify_context, ql.loader.end_of_execution_ptr)
7878

7979
return True
8080

0 commit comments

Comments
 (0)