2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-02 15:45:25 +00:00

msg->tsigkey was not checked for NULL before deferencing [RT #913]

This commit is contained in:
Brian Wellington
2001-02-23 01:38:07 +00:00
parent bc334fc901
commit 5ca7310c8a

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: message.c,v 1.180 2001/02/19 20:14:23 bwelling Exp $ */
/* $Id: message.c,v 1.181 2001/02/23 01:38:07 bwelling Exp $ */
/***
*** Imports
@@ -2717,6 +2717,11 @@ dns_message_signer(dns_message_t *msg, dns_name_t *signer) {
result = DNS_R_TSIGERRORSET;
else
result = ISC_R_SUCCESS;
dns_rdata_freestruct(&tsig);
if (msg->tsigkey == NULL) {
INSIST(result != ISC_R_SUCCESS);
} else {
identity = dns_tsigkey_identity(msg->tsigkey);
if (identity == NULL) {
if (result == ISC_R_SUCCESS)
@@ -2724,7 +2729,7 @@ dns_message_signer(dns_message_t *msg, dns_name_t *signer) {
identity = &msg->tsigkey->name;
}
dns_name_clone(identity, signer);
dns_rdata_freestruct(&tsig);
}
}
return (result);