mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
[master] null terminate strings for coverity
This commit is contained in:
@@ -1162,6 +1162,8 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
if (value != NULL) {
|
||||
n = strlcpy(sitvalue, value,
|
||||
sizeof(sitvalue));
|
||||
sitvalue[sizeof(sitvalue) - 1] = '\0';
|
||||
|
||||
if (n >= sizeof(sitvalue))
|
||||
fatal("SIT data too large");
|
||||
lookup->sitvalue = sitvalue;
|
||||
@@ -1601,6 +1603,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
ip6_int, ISC_FALSE) == ISC_R_SUCCESS) {
|
||||
strncpy((*lookup)->textname, textname,
|
||||
sizeof((*lookup)->textname));
|
||||
(*lookup)->textname[sizeof((*lookup)->textname)-1] = 0;
|
||||
debug("looking up %s", (*lookup)->textname);
|
||||
(*lookup)->trace_root = ISC_TF((*lookup)->trace ||
|
||||
(*lookup)->ns_search_only);
|
||||
|
Reference in New Issue
Block a user