directory_send_command doesn't check string operation return values
When reviewing directory_send_command() in #18051 (moved), I noticed:
We are not checking the return values of tor_snprintf and strlcpy, I wonder if we should do that.
I wonder if the buffers are large enough:
- the maximum length of a DNS name is 254 characters, but the buffers are 128 characters
- the maximum length of an IPv6 address is 48 characters (see TOR_ADDR_BUF_LEN)
- the maximum length of an IPv4 address is 15 characters
- the
:port
adds another 6 characters - the
http://
adds another 7 characters