Commit b836de82 authored by Mark Andrews's avatar Mark Andrews
Browse files

fail if SIT data is too large

parent 23fe5cbb
......@@ -761,7 +761,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
char *cmd, *value, *ptr, *code;
isc_uint32_t num;
isc_boolean_t state = ISC_TRUE;
#if defined(DIG_SIGCHASE) || defined(ISC_PLATFORM_USESIT)
size_t n;
......@@ -1160,8 +1160,10 @@ plus_option(char *option, isc_boolean_t is_batchfile,
lookup->edns = 0;
lookup->sit = state;
if (value != NULL) {
strncpy(sitvalue, value,
n = strlcpy(sitvalue, value,
if (n >= sizeof(sitvalue))
fatal("SIT data too large");
lookup->sitvalue = sitvalue;
} else
lookup->sitvalue = NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment