zig/lib/std
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
..
Build std.fs.Dir: Rename OpenDirOptions to OpenOptions (#20542) 2024-07-09 13:36:38 -07:00
c std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
compress std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
crypto tls.Client: fix out of bounds panic 2024-07-12 03:07:15 -04:00
dwarf dwarf: use StackIterator.MemoryAccessor to check memory accesses instead of isValidMemory 2024-07-10 10:46:35 -04:00
fmt std.float.parseFloat: fix large hex-float parsing 2024-06-15 18:23:06 +02:00
fs std.fs.Dir: Rename OpenDirOptions to OpenOptions (#20542) 2024-07-09 13:36:38 -07:00
hash std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
heap gpa: Add never_unmap and retain_metadata test 2024-05-21 19:09:52 +02:00
http std.posix.iovec: use .base and .len instead of .iov_base and .iov_len 2024-04-28 00:20:30 -07:00
io Add File.getOrEnableAnsiEscapeSupport and use it 2024-06-02 16:46:21 -07:00
json json: respect duplicate_field_behavior in std.json.Value.jsonParse 2024-07-03 15:34:59 -04:00
math math.hypot: fix incorrect over/underflow behavior (#19472) 2024-05-30 09:58:05 +00:00
mem
meta std: promote tests to doctests 2024-03-21 14:11:46 -07:00
net std.net, std.http: simplify 2024-02-23 02:37:11 -07:00
os Merge pull request #20561 from jacobly0/debug-segfaults 2024-07-09 21:03:36 -04:00
posix std: Convert deprecated aliases to compile errors and fix usages 2024-06-13 10:18:59 -04:00
process std.Build.findProgram(): Try with and without the Windows executable extensions. 2024-06-21 15:41:03 -04:00
Random extract std.posix from std.os 2024-03-19 11:45:09 -07:00
sort std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
tar std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
Target std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
testing
Thread test: Add spawn behavior test 2024-07-09 21:15:29 -04:00
time std: promote tests to doctests 2024-03-21 14:11:46 -07:00
tz
unicode
valgrind std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
zip std: Convert deprecated aliases to compile errors and fix usages 2024-06-13 10:18:59 -04:00
array_hash_map.zig std.ArrayHashMap: unmanaged holds the pointer stability lock 2024-07-07 12:13:07 +02:00
array_list.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
ascii.zig Rename isASCII to isAscii 2024-07-02 16:31:15 +02:00
atomic.zig bsd: debitrot AtomicOrder renames 2024-03-15 02:28:50 -04:00
base64.zig improve documentation in std 2024-03-10 18:13:30 -07:00
bit_set.zig std: promote tests to doctests 2024-03-21 14:11:46 -07:00
BitStack.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
bounded_array.zig Implement addManyAsSlice for BoundedArray 2024-05-21 13:46:05 +03:00
buf_map.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
buf_set.zig Change many test blocks to doctests/decltests 2024-02-26 15:18:31 -08:00
Build.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
builtin.zig riscv: back to hello world panics 2024-05-11 02:17:11 -07:00
c.zig std.c: Add setlocale() 2024-07-05 04:45:44 -04:00
coff.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
compress.zig improve documentation in std 2024-03-10 18:13:30 -07:00
crypto.zig Merge pull request #19239 from jedisct1/ml-kem 2024-03-11 18:48:08 -07:00
debug.zig dwarf: use StackIterator.MemoryAccessor to check memory accesses instead of isValidMemory 2024-07-10 10:46:35 -04:00
dwarf.zig dwarf: use StackIterator.MemoryAccessor to check memory accesses instead of isValidMemory 2024-07-10 10:46:35 -04:00
dynamic_library.zig std: avoid references that trigger compile errors 2024-07-04 21:01:42 +01:00
elf.zig add ppc64 reloc definitions 2024-07-02 08:59:10 +02:00
enums.zig EnumMap: fix init 2024-05-26 16:13:54 -04:00
fifo.zig std: promote tests to doctests 2024-03-21 14:11:46 -07:00
fmt.zig Progress: fix compile errors on windows 2024-05-27 20:56:48 -07:00
fs.zig std.fs.Dir: Rename OpenDirOptions to OpenOptions (#20542) 2024-07-09 13:36:38 -07:00
gpu.zig std: add gpu namespace 2024-02-05 11:55:14 +03:30
hash.zig
hash_map.zig hash_map.zig: Pass self by value and less pointer-int conversion 2024-05-27 13:22:50 +03:00
heap.zig extract std.posix from std.os 2024-03-19 11:45:09 -07:00
http.zig std: avoid references that trigger compile errors 2024-07-04 21:01:42 +01:00
io.zig add std.zip and support zip files in build.zig.zon 2024-05-03 16:58:53 -04:00
json.zig Delete compile errors for deprecated decls 2024-05-03 13:27:30 -07:00
leb128.zig Rename *[UI]LEB128 functions to *[UI]leb128 2024-06-23 04:30:12 +01:00
linked_list.zig Revert "std.SinglyLinkedList: add sort function" 2023-11-24 22:33:50 -07:00
log.zig update the codebase for the new std.Progress API 2024-05-27 20:56:48 -07:00
macho.zig The Mach-O header flags gained two new members at some point, and these are missing in the Zig std library. This PR adds these. 2024-04-18 20:08:03 -07:00
math.zig Support Vectors in std.math.clamp 2024-06-01 13:28:16 +03:00
mem.zig std.mem.zeroes: explicit compile error for @Type(.EnumLiteral) 2024-06-24 00:43:09 +00:00
meta.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
multi_array_list.zig InternPool: implement and use thread-safe list for strings 2024-07-07 22:59:52 -04:00
net.zig std: avoid references that trigger compile errors 2024-07-04 21:01:42 +01:00
once.zig std: improve std.once tests 2024-04-15 15:24:30 -07:00
os.zig std: Convert deprecated aliases to compile errors and fix usages 2024-06-13 10:18:59 -04:00
packed_int_array.zig compiler: un-implement #19634 2024-04-17 13:41:25 +01:00
pdb.zig extract std.posix from std.os 2024-03-19 11:45:09 -07:00
posix.zig fix: Use std.os.windows.poll rather than libc 2024-07-10 01:35:01 -04:00
priority_dequeue.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
priority_queue.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
process.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
Progress.zig std.Progress: slightly better atomic memcpy 2024-07-10 00:28:44 -04:00
Random.zig std: Convert deprecated aliases to compile errors and fix usages 2024-06-13 10:18:59 -04:00
RingBuffer.zig std.RingBuffer: use sliceAt/sliceFirst in read*AssumeLength 2024-03-10 18:17:23 +11:00
segmented_list.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
SemanticVersion.zig Change many test blocks to doctests/decltests 2024-02-26 15:18:31 -08:00
simd.zig Delete compile errors for deprecated decls 2024-05-03 13:27:30 -07:00
sort.zig std: fuzz test sort stability (#20284) 2024-06-20 12:38:54 -07:00
start.zig Revert "start: workaround for LLVM 17 regression" 2024-06-16 23:11:08 -04:00
start_windows_tls.zig
static_string_map.zig std.static_string_map: Cast length of input for runtime initialization 2024-06-20 23:22:39 +00:00
std.zig std: Convert deprecated aliases to compile errors and fix usages 2024-06-13 10:18:59 -04:00
tar.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
Target.zig std.Target: Use arch8 as the baseline CPU model for s390x. 2024-07-05 01:52:18 -04:00
testing.zig std.fs.Dir: Rename OpenDirOptions to OpenOptions (#20542) 2024-07-09 13:36:38 -07:00
Thread.zig test: Add spawn behavior test 2024-07-09 21:15:29 -04:00
time.zig handle visionos target OS tag in the compiler 2024-05-09 15:04:15 +02:00
treap.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
tz.zig std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
unicode.zig std: Convert deprecated aliases to compile errors and fix usages 2024-06-13 10:18:59 -04:00
Uri.zig std.http.Client: always omit port when it matches default 2024-04-12 22:37:07 -07:00
valgrind.zig Rename nonSIMDCall* to nonSimdCall* 2024-07-03 19:00:17 +01:00
wasm.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
zig.zig compiler: move LazySrcLoc out of std 2024-06-15 00:57:52 +01:00
zip.zig std.zip: Fix typo in doc comments 2024-06-17 16:12:19 -04:00