]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix assignment vs comparison typo in tcp_connected()
authorOndřej Surý <ondrej@isc.org>
Mon, 19 Dec 2022 17:17:46 +0000 (18:17 +0100)
committerOndřej Surý <ondrej@isc.org>
Wed, 21 Dec 2022 12:41:15 +0000 (12:41 +0000)
In tcp_connected() a typo has turned a DbC check into an assignment
breaking the state machine and making the dns_dispatch_gettcp() try to
attach to dispatch in process of destruction.

lib/dns/dispatch.c

index cf426f32eb7b61ab1fb46685da8a8a4482b2a306..3fbdb7f1489951623cd9561bbd992dc0146b3956 100644 (file)
@@ -1842,7 +1842,7 @@ tcp_connected(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
        }
 
        LOCK(&disp->lock);
-       INSIST(disp->state = DNS_DISPATCHSTATE_CONNECTING);
+       INSIST(disp->state == DNS_DISPATCHSTATE_CONNECTING);
 
        if (eresult == ISC_R_SUCCESS) {
                disp->state = DNS_DISPATCHSTATE_CONNECTED;