diff --git a/lib/std/crypto/tls/Client.zig b/lib/std/crypto/tls/Client.zig index 44891a197395e6c0238b17f98f130de545f98c05..627ad7ea595826759c8e852678fc4357f96ac651 100644 --- a/lib/std/crypto/tls/Client.zig +++ b/lib/std/crypto/tls/Client.zig @@ -1207,6 +1207,7 @@ const VecPut = struct { /// Returns the amount actually put which is always equal to bytes.len /// unless the vectors ran out of space. fn put(vp: *VecPut, bytes: []const u8) usize { + if (vp.idx >= vp.iovecs.len) return 0; var bytes_i: usize = 0; while (true) { const v = vp.iovecs[vp.idx];