aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-05-17 20:39:12 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-05-18 03:26:16 -0700
commit7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 (patch)
treee02fdfd1b337c556c544f4c0202e48da28827c29 /lib/std/Thread
parent378264d404e71da878f9e6934c045ad64193877f (diff)
downloadzig-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 'lib/std/Thread')
0 files changed, 0 insertions, 0 deletions