mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
fix sitvalue
This commit is contained in:
@@ -116,6 +116,9 @@ static in_port_t port = 53;
|
|||||||
static isc_dscp_t dscp = -1;
|
static isc_dscp_t dscp = -1;
|
||||||
static unsigned char cookie_secret[33];
|
static unsigned char cookie_secret[33];
|
||||||
static int onfly = 0;
|
static int onfly = 0;
|
||||||
|
#ifdef ISC_PLATFORM_USESIT
|
||||||
|
static char sitvalue[256];
|
||||||
|
#endif
|
||||||
|
|
||||||
struct query {
|
struct query {
|
||||||
char textname[MXNAME]; /*% Name we're going to be looking up */
|
char textname[MXNAME]; /*% Name we're going to be looking up */
|
||||||
@@ -1341,10 +1344,8 @@ plus_option(char *option, struct query *query, isc_boolean_t global)
|
|||||||
query->edns = 0;
|
query->edns = 0;
|
||||||
query->sit = state;
|
query->sit = state;
|
||||||
if (value != NULL) {
|
if (value != NULL) {
|
||||||
n = strlcpy(query->sitvalue,
|
n = strlcpy(sitvalue, value, sizeof(sitvalue));
|
||||||
value,
|
if (n >= sizeof(sitvalue))
|
||||||
sizeof(query->sitvalue));
|
|
||||||
if (n >= sizeof(query->sitvalue))
|
|
||||||
fatal("SIT data too large");
|
fatal("SIT data too large");
|
||||||
} else
|
} else
|
||||||
query->sitvalue = NULL;
|
query->sitvalue = NULL;
|
||||||
|
Reference in New Issue
Block a user