Igor Anić ca752c61c0 tls.Client: fix out of bounds panic
When calculating how much ciphertext from the stream can fit into
user and internal buffers we should also take into account ciphertext
data which are already in internal buffer.

Fixes: 15226

Tested with
[this](https://github.com/ziglang/zig/issues/15226#issuecomment-2218809140).
Using client with different read buffers until I, hopefully, understood
what is happening.

Not relevant to this fix, but this
[part](95d9292a7a/lib/std/crypto/tls/Client.zig (L988-L991))
is still mystery to me. Why we don't use free_size in buf_cap
calculation. Seems like rudiment from previous implementation without iovec.
2024-07-12 03:07:15 -04:00
..
2024-03-19 11:45:09 -07:00
2024-07-12 03:07:15 -04:00
2024-02-25 11:22:10 +01:00
2024-07-09 14:25:42 -07:00
2023-11-03 23:18:21 -04:00
2024-07-09 14:25:42 -07:00
2024-07-09 14:25:42 -07:00
2023-11-03 23:18:21 -04:00
2024-07-09 14:25:42 -07:00
2024-07-09 14:25:42 -07:00
2024-07-09 14:25:42 -07:00
2024-03-21 14:11:46 -07:00