Skip to content

Don't use stack allocated buffer for uv_write()

On FreeBSD, the stack is destroyed more aggressively than on Linux and that revealed a bug where we were allocating the 16-bit len for the TCPDNS message on the stack and the buffer got garbled before the uv_write() sendback was executed. Now, the len is part of the uvreq, so we can safely pass it to the uv_write() as the req gets destroyed after the sendcb is executed.

Closes #2332 (closed)

Edited by Ondřej Surý

Merge request reports