fix: negative line length, write(2) to bad fd
This commit is contained in:
parent
65dc844f54
commit
76b53ad30c
1 changed files with 7 additions and 2 deletions
9
client.s
9
client.s
|
@ -92,15 +92,17 @@ client__pollout:
|
|||
mov rbx, rdx
|
||||
mov r12, rsi
|
||||
|
||||
push rdi
|
||||
mov rdi, r12
|
||||
add rdi, OFFSET_CLIENT_BUFFER
|
||||
mov rsi, 255
|
||||
call scanline
|
||||
pop rdi
|
||||
|
||||
; poll(2)'d for POLLOUT but we had no line buffered;
|
||||
; should be impossible
|
||||
cmp rax, 0
|
||||
mov rax, -1024
|
||||
je client__pollout__return
|
||||
je client__pollout__no_line
|
||||
|
||||
mov r13, rax
|
||||
|
||||
|
@ -135,6 +137,9 @@ client__pollout__shunt__finished:
|
|||
jl client__pollout__return
|
||||
mov word [pollfds + rbx * pollfd_size + 4], POLLIN
|
||||
|
||||
client__pollout__no_line:
|
||||
mov rax, -1024
|
||||
|
||||
client__pollout__return:
|
||||
pop r13
|
||||
pop r12
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue