From: Artem Boldariev Date: Wed, 12 May 2021 08:53:35 +0000 (+0300) Subject: Do not allow empty DoH endpoints to be added X-Git-Tag: v9.17.14~61^2~3 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=d80d1b0dd9cfbb6989aa1846b21fdaf246733d28;p=thirdparty%2Fbind9.git 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. --- diff --git a/lib/isc/netmgr/http.c b/lib/isc/netmgr/http.c index 8ac2dd5ed8d..599dd861114 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 };