__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 rsi
|
||||
pop rdi
|
||||
test rax, rax
|
||||
js .quit
|
||||
xor r10, r10
|
||||
|
||||
cmp r9b, 0
|
||||
@@ -475,6 +477,8 @@ __INTERNAL_fmt:
|
||||
mov rdx, r10
|
||||
mov r10, r11
|
||||
syscall
|
||||
test rax, rax
|
||||
js .quit
|
||||
mov rax, r10
|
||||
jmp .quit
|
||||
|
||||
|
Reference in New Issue
Block a user