mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-11 09:52:56 -04:00
BUG/MINOR: resolvers: do not reject host names of length 255 in SRV records
An off-by-one issue in buffer size calculation used to limit the output of resolv_dn_label_to_str() to 254 instead of 255. This must be backported to 2.0.
This commit is contained in:
parent
947ae125cc
commit
85c15e6bff
1 changed files with 2 additions and 2 deletions
|
|
@ -778,10 +778,10 @@ srv_found:
|
|||
|
||||
if (!srv->hostname_dn) {
|
||||
const char *msg = NULL;
|
||||
char hostname[DNS_MAX_NAME_SIZE];
|
||||
char hostname[DNS_MAX_NAME_SIZE+1];
|
||||
|
||||
if (resolv_dn_label_to_str(item->target, item->data_len+1,
|
||||
hostname, DNS_MAX_NAME_SIZE) == -1) {
|
||||
hostname, sizeof(hostname)) == -1) {
|
||||
HA_SPIN_UNLOCK(SERVER_LOCK, &srv->lock);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue