summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bind/bin/dig/dig.c
diff options
context:
space:
mode:
authorjakob <jakob@openbsd.org>2003-04-23 06:56:12 +0000
committerjakob <jakob@openbsd.org>2003-04-23 06:56:12 +0000
commit263f76bf45b26e0eab9feff85265369b515d025f (patch)
tree36e1d5816126495d31197d82c8ff0805b4c58ae2 /usr.sbin/bind/bin/dig/dig.c
parentMove m_copyback() to uipc_mbuf where it makes some kinda sense; ok dhartmei (diff)
downloadwireguard-openbsd-263f76bf45b26e0eab9feff85265369b515d025f.tar.xz
wireguard-openbsd-263f76bf45b26e0eab9feff85265369b515d025f.zip
more snprintf and strlcpy/strlcat fixes. from todd@ and tedu@.
Diffstat (limited to 'usr.sbin/bind/bin/dig/dig.c')
-rw-r--r--usr.sbin/bind/bin/dig/dig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bind/bin/dig/dig.c b/usr.sbin/bind/bin/dig/dig.c
index 530cac3201d..bcbb3ac99cd 100644
--- a/usr.sbin/bind/bin/dig/dig.c
+++ b/usr.sbin/bind/bin/dig/dig.c
@@ -1127,7 +1127,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
if (homedir != NULL)
snprintf(rcfile, sizeof(rcfile), "%s/.digrc", homedir);
else
- strcpy(rcfile, ".digrc");
+ strlcpy(rcfile, ".digrc", sizeof(rcfile));
batchfp = fopen(rcfile, "r");
if (batchfp != NULL) {
while (fgets(batchline, sizeof(batchline),
@@ -1312,7 +1312,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
lookup->trace_root = ISC_TF(lookup->trace ||
lookup->ns_search_only);
lookup->new_search = ISC_TRUE;
- strcpy(lookup->textname, ".");
+ strlcpy(lookup->textname, ".", sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ns;
lookup->rdtypeset = ISC_TRUE;
if (firstarg) {