diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-17 20:39:12 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-05-18 03:26:16 -0700 |
| commit | 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 (patch) | |
| tree | e02fdfd1b337c556c544f4c0202e48da28827c29 /test/cases/compile_errors | |
| parent | 378264d404e71da878f9e6934c045ad64193877f (diff) | |
| download | zig-7cf2cbb33ef34c1d211135f56d30fe23b6cacd42.tar.gz zig-7cf2cbb33ef34c1d211135f56d30fe23b6cacd42.zip | |
std.crypto.tls.Client.readvAdvanced: fix bugs
* When there is buffered cleartext, return it without calling the
underlying read function. This prevents buffer overflow due to space
used up by cleartext.
* Avoid clearing the buffer when the buffered cleartext could not be
completely given to the result read buffer, and there is some
buffered ciphertext left.
* Instead of rounding up the amount of bytes to ask for to the nearest
TLS record size, round down, with a minimum of 1. This prevents the
code path from being taken which requires extra memory copies.
* Avoid calling `@memcpy` with overlapping arguments.
closes #15590
Diffstat (limited to 'test/cases/compile_errors')
0 files changed, 0 insertions, 0 deletions
