Fix strcat SIGSEGV crash
This commit is contained in:
@@ -31,8 +31,8 @@ print:
|
||||
mov rsi, rdi
|
||||
call strlen
|
||||
mov rdx, rax
|
||||
mov rax, NR_write
|
||||
mov rdi, FD_stdout
|
||||
mov eax, NR_write
|
||||
mov edi, FD_stdout
|
||||
syscall
|
||||
add rsp, SIZE_QWORD
|
||||
ret
|
||||
@@ -48,11 +48,11 @@ print:
|
||||
puts:
|
||||
sub rsp, SIZE_QWORD
|
||||
call print
|
||||
mov rsi, mNL
|
||||
mov esi, mNL
|
||||
mov r10, rax
|
||||
mov rax, NR_write
|
||||
mov rdi, FD_stdout
|
||||
mov rdx, 1
|
||||
mov eax, NR_write
|
||||
mov edi, FD_stdout
|
||||
mov edx, 1
|
||||
syscall
|
||||
mov rax, r10
|
||||
inc rax
|
||||
|
Reference in New Issue
Block a user