Skip to content

Commit 296cb75

Browse files
committed
Fix bytes api misuse bug
1 parent 91bacae commit 296cb75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qiling/os/uefi/bs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,10 @@ def hook_CopyMem(ql: Qiling, address: int, params):
494494
})
495495
def hook_SetMem(ql: Qiling, address: int, params):
496496
buffer = params["Buffer"]
497-
value = params["Value"] & 0xff
497+
value: int = params["Value"] & 0xff
498498
size = params["Size"]
499499

500-
ql.mem.write(buffer, bytes(value) * size)
500+
ql.mem.write(buffer, bytes(chr(value), 'ascii') * size)
501501

502502
@dxeapi(params = {
503503
"Type" : UINT, # UINT32

0 commit comments

Comments
 (0)