]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix Coverity CID 487882: Error handling issues
authorMatthijs Mekking <matthijs@isc.org>
Tue, 12 Mar 2024 10:59:38 +0000 (11:59 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Thu, 14 Mar 2024 13:01:23 +0000 (14:01 +0100)
commitad33a73f83a847874ba0d2e7e882e394618a3f7a
treeffc9346da9aa432984c0f1c544e4fc317eaf8db2
parent8d3f601a6b48a55e52d7d6fd7d595ca74b591952
Fix Coverity CID 487882: Error handling issues

The dns_qpiter_next() was called without checking the return value. If
we cannot move the iterator forward, there is no use in calling the
step() function.

/lib/dns/qpzone.c: 2804 in activeempty()
2798       * of the name we were searching for. Step the iterator
2799       * forward, then step() will continue forward until it
2800       * finds a node with active data. If that node is a
2801       * subdomain of the one we were looking for, then we're
2802       * at an active empty nonterminal node.
2803       */
>>>     CID 487882:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "dns_qpiter_next" without checking return value (as is done elsewhere 26 out of 27 times).
2804      dns_qpiter_next(it, NULL, NULL, NULL);
2805      return (step(search, it, FORWARD, next) &&
2806      dns_name_issubdomain(next, current));
2807     }
lib/dns/qpzone.c