| ... | @@ -958,6 +958,13 @@ pub fn readvAdvanced(c: *Client, stream: anytype, iovecs: []const std.os.iovec) | ... | @@ -958,6 +958,13 @@ pub fn readvAdvanced(c: *Client, stream: anytype, iovecs: []const std.os.iovec) |
| 958 | // The amount of the user's buffer that will be used to give cleartext. The | 958 | // The amount of the user's buffer that will be used to give cleartext. The |
| 959 | // beginning of the buffer will be used for such purposes. | 959 | // beginning of the buffer will be used for such purposes. |
| 960 | const cleartext_buf_len = free_size - ciphertext_buf_len; | 960 | const cleartext_buf_len = free_size - ciphertext_buf_len; |
| | 961 | |
| | 962 | // Recoup `partially_read_buffer space`. This is necessary because it is assumed |
| | 963 | // below that `frag0` is big enough to hold at least one record. |
| | 964 | limitedOverlapCopy(c.partially_read_buffer[0..c.partial_ciphertext_end], c.partial_ciphertext_idx); |
| | 965 | c.partial_ciphertext_end -= c.partial_ciphertext_idx; |
| | 966 | c.partial_ciphertext_idx = 0; |
| | 967 | c.partial_cleartext_idx = 0; |
| 961 | const first_iov = c.partially_read_buffer[c.partial_ciphertext_end..]; | 968 | const first_iov = c.partially_read_buffer[c.partial_ciphertext_end..]; |
| 962 | | 969 | |
| 963 | var ask_iovecs_buf: [2]std.os.iovec = .{ | 970 | var ask_iovecs_buf: [2]std.os.iovec = .{ |