#define PROXY_BALANCER_MAX_HOSTNAME_SIZE 64
#define PROXY_BALANCER_MAX_STICKY_SIZE 64
+/* RFC-1035 mentions limits of 255 for host-names and 253 for domain-names,
+ * dotted together(?) this would fit the below size (+ trailing NUL).
+ */
+#define PROXY_WORKER_RFC1035_NAME_SIZE 512
+
#define PROXY_MAX_PROVIDER_NAME_SIZE 16
#define PROXY_STRNCPY(dst, src) ap_proxy_strncpy((dst), (src), (sizeof(dst)))
* restore any ssl_hostname for this connection set earlier by
* ap_proxy_determine_connection().
*/
- char ssl_hostname[512]; /* host+domain names max (rfc1035-2.3.4) */
+ char ssl_hostname[PROXY_WORKER_RFC1035_NAME_SIZE];
if (!conn->ssl_hostname || PROXY_STRNCPY(ssl_hostname,
conn->ssl_hostname)) {
ssl_hostname[0] = '\0';