2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

check code is non NULL

This commit is contained in:
Bill Parker
2018-07-11 13:48:08 +10:00
committed by Evan Hunt
parent cc9c97fdfc
commit 408bcf9c07

View File

@@ -1001,14 +1001,20 @@ plus_option(char *option, isc_boolean_t is_batchfile,
lookup->ednsoptscnt = 0;
break;
}
if (value == NULL) {
code = NULL;
if (value != NULL) {
code = strtok_r(value,
":",
&last);
}
if (code == NULL) {
warn("ednsopt no "
"code point "
"specified");
goto exit_or_usage;
}
code = strtok_r(value, ":", &last);
extra = strtok_r(NULL, "\0", &last);
extra = strtok_r(NULL, "\0",
&last);
save_opt(lookup, code, extra);
break;
default: