summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2019-11-08 17:34:51 +0000
committerThomas Markwalder <tmark@isc.org>2019-11-08 17:34:51 +0000
commit9050875357d4dbeda7f9262f27ce94fa9e814e43 (patch)
tree87cd0fca842c6cb35cfe57974e28bf4924df9cb7
parentb52f3de097afbd4411e1ef285c542557d3a98edd (diff)
downloadisc-dhcp-15-v4_1_esv-confpars-c-has-invalid-error-messages-when-memory-allocation-fails.tar.gz
minires/res_query.c - replaced a strncpy with memcpy
-rw-r--r--minires/res_query.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/minires/res_query.c b/minires/res_query.c
index 649d813c..bcce4dba 100644
--- a/minires/res_query.c
+++ b/minires/res_query.c
@@ -344,7 +344,7 @@ res_nquerydomain(res_state statp,
}
n--;
if (n >= 0 && name[n] == '.') {
- strncpy(nbuf, name, (unsigned)n);
+ memcpy(nbuf, name, (unsigned)n);
nbuf[n] = '\0';
} else
longname = name;