__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:
2025-07-26 01:10:34 +02:00
parent e8b47fff6d
commit 5b6831a501

View File

@@ -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