__INTERNAL_fmt: Exit if syscall NR_write fails (which is very likely if called through fwrite with an invalid FD)
This commit is contained in:
@@ -457,6 +457,8 @@ __INTERNAL_fmt:
|
|||||||
pop rdx
|
pop rdx
|
||||||
pop rsi
|
pop rsi
|
||||||
pop rdi
|
pop rdi
|
||||||
|
test rax, rax
|
||||||
|
js .quit
|
||||||
xor r10, r10
|
xor r10, r10
|
||||||
|
|
||||||
cmp r9b, 0
|
cmp r9b, 0
|
||||||
@@ -475,6 +477,8 @@ __INTERNAL_fmt:
|
|||||||
mov rdx, r10
|
mov rdx, r10
|
||||||
mov r10, r11
|
mov r10, r11
|
||||||
syscall
|
syscall
|
||||||
|
test rax, rax
|
||||||
|
js .quit
|
||||||
mov rax, r10
|
mov rax, r10
|
||||||
jmp .quit
|
jmp .quit
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user