| ... | @@ -1012,7 +1012,7 @@ pub fn readvAdvanced(c: *Client, stream: anytype, iovecs: []const std.posix.iove | ... | @@ -1012,7 +1012,7 @@ pub fn readvAdvanced(c: *Client, stream: anytype, iovecs: []const std.posix.iove |
| 1012 | // Cleartext capacity of output buffer, in records. Minimum one full record. | 1012 | // Cleartext capacity of output buffer, in records. Minimum one full record. |
| 1013 | const buf_cap = @max(cleartext_buf_len / max_ciphertext_len, 1); | 1013 | const buf_cap = @max(cleartext_buf_len / max_ciphertext_len, 1); |
| 1014 | const wanted_read_len = buf_cap * (max_ciphertext_len + tls.record_header_len); | 1014 | const wanted_read_len = buf_cap * (max_ciphertext_len + tls.record_header_len); |
| 1015 | const ask_len = @max(wanted_read_len, cleartext_stack_buffer.len); | 1015 | const ask_len = @max(wanted_read_len, cleartext_stack_buffer.len) - c.partial_ciphertext_end; |
| 1016 | const ask_iovecs = limitVecs(&ask_iovecs_buf, ask_len); | 1016 | const ask_iovecs = limitVecs(&ask_iovecs_buf, ask_len); |
| 1017 | const actual_read_len = try stream.readv(ask_iovecs); | 1017 | const actual_read_len = try stream.readv(ask_iovecs); |
| 1018 | if (actual_read_len == 0) { | 1018 | if (actual_read_len == 0) { |