mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
cfg_obj_asnetprefix() check that the destinations are non NULL before writing to them
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: parser.c,v 1.135 2010/08/11 18:14:20 each Exp $ */
|
||||
/* $Id: parser.c,v 1.136 2010/11/16 00:41:32 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -2006,8 +2006,12 @@ cfg_obj_isnetprefix(const cfg_obj_t *obj) {
|
||||
|
||||
void
|
||||
cfg_obj_asnetprefix(const cfg_obj_t *obj, isc_netaddr_t *netaddr,
|
||||
unsigned int *prefixlen) {
|
||||
unsigned int *prefixlen)
|
||||
{
|
||||
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_netprefix);
|
||||
REQUIRE(netaddr != NULL);
|
||||
REQUIRE(prefixlen != NULL);
|
||||
|
||||
*netaddr = obj->value.netprefix.address;
|
||||
*prefixlen = obj->value.netprefix.prefixlen;
|
||||
}
|
||||
|
Reference in New Issue
Block a user