From d80d1b0dd9cfbb6989aa1846b21fdaf246733d28 Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Wed, 12 May 2021 11:53:35 +0300 Subject: [PATCH] Do not allow empty DoH endpoints to be added It was possible to specify empty DoH endpoint in BIND's configuration file: that was an error, we should not allow doing so. --- lib/isc/netmgr/http.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/isc/netmgr/http.c b/lib/isc/netmgr/http.c index 8ac2dd5ed8..599dd86111 100644 --- a/lib/isc/netmgr/http.c +++ b/lib/isc/netmgr/http.c @@ -2205,6 +2205,7 @@ isc_nm_http_endpoint(isc_nmsocket_t *sock, const char *uri, isc_nm_recv_cb_t cb, REQUIRE(VALID_NMSOCK(sock)); REQUIRE(sock->type == isc_nm_httplistener); + REQUIRE(uri != NULL && *uri != '\0'); httpcbarg = isc_mem_get(sock->mgr->mctx, sizeof(isc_nm_httpcbarg_t)); *httpcbarg = (isc_nm_httpcbarg_t){ .cb = cb, .cbarg = cbarg };