diff options
author | Xin LI <delphij@FreeBSD.org> | 2016-03-10 04:17:58 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2016-03-10 04:17:58 +0000 |
commit | 5ef882476736cbe802bb4e6437c520162c4f44ce (patch) | |
tree | 03c6af9b2c7a9d6383d6f80f711b0bffbd84cd5f /bin | |
parent | 1d5aae19328e5f0078324f9af01fd8898340bd50 (diff) |
Notes
Diffstat (limited to 'bin')
-rw-r--r-- | bin/named/control.c | 4 | ||||
-rw-r--r-- | bin/named/controlconf.c | 4 | ||||
-rw-r--r-- | bin/named/query.c | 5 | ||||
-rw-r--r-- | bin/rndc/rndc.c | 10 |
4 files changed, 12 insertions, 11 deletions
diff --git a/bin/named/control.c b/bin/named/control.c index aacb0884fde0a..37e3a38437b30 100644 --- a/bin/named/control.c +++ b/bin/named/control.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007, 2009-2015 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -69,7 +69,7 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) { #endif data = isccc_alist_lookup(message, "_data"); - if (data == NULL) { + if (!isccc_alist_alistp(data)) { /* * No data section. */ diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c index a9d498401d496..ddb7000ca7aaf 100644 --- a/bin/named/controlconf.c +++ b/bin/named/controlconf.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2008, 2011-2014 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008, 2011-2014, 2016 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -397,7 +397,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) { * Limit exposure to replay attacks. */ _ctrl = isccc_alist_lookup(request, "_ctrl"); - if (_ctrl == NULL) { + if (!isccc_alist_alistp(_ctrl)) { log_invalid(&conn->ccmsg, ISC_R_FAILURE); goto cleanup_request; } diff --git a/bin/named/query.c b/bin/named/query.c index f2ca55538780b..8df3c714514a3 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2016 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -3221,7 +3221,8 @@ query_addbestns(ns_client_t *client) { goto cleanup; /* - * If the answer is secure only add NS records if they are secure * when the client may be looking for AD in the response. + * If the answer is secure only add NS records if they are secure + * when the client may be looking for AD in the response. */ if (SECURE(client) && (WANTDNSSEC(client) || WANTAD(client)) && ((rdataset->trust != dns_trust_secure) || diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index c7d8fe1f84314..a86dd3b875244 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2016 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -249,8 +249,8 @@ rndc_recvdone(isc_task_t *task, isc_event_t *event) { DO("parse message", isccc_cc_fromwire(&source, &response, &secret)); data = isccc_alist_lookup(response, "_data"); - if (data == NULL) - fatal("no data section in response"); + if (!isccc_alist_alistp(data)) + fatal("bad or missing data section in response"); result = isccc_cc_lookupstring(data, "err", &errormsg); if (result == ISC_R_SUCCESS) { failed = ISC_TRUE; @@ -313,8 +313,8 @@ rndc_recvnonce(isc_task_t *task, isc_event_t *event) { DO("parse message", isccc_cc_fromwire(&source, &response, &secret)); _ctrl = isccc_alist_lookup(response, "_ctrl"); - if (_ctrl == NULL) - fatal("_ctrl section missing"); + if (!isccc_alist_alistp(_ctrl)) + fatal("bad or missing ctrl section in response"); nonce = 0; if (isccc_cc_lookupuint32(_ctrl, "_nonce", &nonce) != ISC_R_SUCCESS) nonce = 0; |