Resolve "crash while receiving 64 kiB message over TCP"
Handle cases when buf_size is zero
The isc_dnsstream_assembler_incoming() inline function expects that when 'buf_size' is zero, then 'buf' must be NULL. The expectation is not correct, because those values come from the libuv read callback, and its documentation notes[1] that 'nread' ('buf_size' here) might be 0, which does not indicate an error or EOF, but is equivalent to EAGAIN or EWOULDBLOCK under read(2).
Change the isc_dnsstream_assembler_incoming() inline function to remove the invalid expectation.
[1] https://docs.libuv.org/en/v1.x/stream.html#c.uv_read_cb
Closes #4273 (closed)
Edited by Arаm Sаrgsyаn