diff options
author | Rich Felker <dalias@aerifal.cx> | 2022-09-22 12:41:23 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2022-09-22 12:41:23 -0400 |
commit | e2e9517607f67c1e23c059769b19bf4270d22123 (patch) | |
tree | f8d4c7cc836e5387811a7c8e27c03dedbc927990 /src/crypt/crypt_des.h | |
parent | c87d75f2aa6fde49a99cf3287e535a14f354f781 (diff) | |
download | musl-e2e9517607f67c1e23c059769b19bf4270d22123.tar.gz musl-e2e9517607f67c1e23c059769b19bf4270d22123.tar.xz musl-e2e9517607f67c1e23c059769b19bf4270d22123.zip |
res_send: use a temp buffer if caller's buffer is under 512 bytes
for extremely small buffer sizes, the DNS query core in __res_msend may malfunction completely, being unable to get even the headers to determine the response code. but there is also a problem for reasonable sizes under 512 bytes: __res_msend is unable to determine if the udp answer was truncated at the recv layer, in which case it may be incomplete, and res_send is then unable to honor its contract to return the length of the full, non-truncated answer. at present, res_send does not honor that contract anyway when the full answer would exceed 512 bytes, since there is no tcp fallback, but this change at least makes it consistent in a context where this is the only "full answer" to be had.
Diffstat (limited to 'src/crypt/crypt_des.h')
0 files changed, 0 insertions, 0 deletions