There was a bug in tls_connection_receive_preallocated.
If the length of the provided preallocated buffer was larger than the length of the packet, we would set length to the length of the buffer, and crash during memcpy. Fix this.
While we are at it, clarify the name of the variable Llength (this variable name should have been cleaned up before PR-ing).
There was a bug in
tls_connection_receive_preallocated
.If the length of the provided preallocated buffer was larger than the length of the packet, we would set
length
to the length of the buffer, and crash duringmemcpy
. Fix this.While we are at it, clarify the name of the variable
Llength
(this variable name should have been cleaned up before PR-ing).