]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix sitvalue
authorMark Andrews <marka@isc.org>
Wed, 11 Feb 2015 11:57:50 +0000 (22:57 +1100)
committerMark Andrews <marka@isc.org>
Wed, 11 Feb 2015 11:57:50 +0000 (22:57 +1100)
bin/tools/mdig.c

index ba3becfb83ef0b84112643e50400eb4e309c8865..4e0260be78e6bac5ee422bf9872fb285b73e21bd 100644 (file)
@@ -116,6 +116,9 @@ static in_port_t port = 53;
 static isc_dscp_t dscp = -1;
 static unsigned char cookie_secret[33];
 static int onfly = 0;
+#ifdef ISC_PLATFORM_USESIT
+static char sitvalue[256];
+#endif
 
 struct query {
        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->sit = state;
                        if (value != NULL) {
-                               n = strlcpy(query->sitvalue,
-                                           value,
-                                           sizeof(query->sitvalue));
-                               if (n >= sizeof(query->sitvalue))
+                               n = strlcpy(sitvalue, value, sizeof(sitvalue));
+                               if (n >= sizeof(sitvalue))
                                        fatal("SIT data too large");
                        } else
                                query->sitvalue = NULL;