doh: reduce the DNS request buffer size

No point in having it larger than the largest allowed request size.

Also removed a no longer used struct.

Closes #17087
This commit is contained in:
Daniel Stenberg 2025-04-17 17:54:59 +02:00
parent d6c8907864
commit 834836dc14
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 5 additions and 11 deletions

View file

@ -115,7 +115,7 @@ UNITTEST DOHcode doh_req_encode(const char *host,
if(host[hostlen-1]!='.')
expected_len++;
if(expected_len > (256 + 16)) /* RFCs 1034, 1035 */
if(expected_len > DOH_MAX_DNSREQ_SIZE)
return DOH_DNS_NAME_TOO_LONG;
if(len < expected_len)