summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2015-09-11 20:21:30 +0000
committerbeck <beck@openbsd.org>2015-09-11 20:21:30 +0000
commit7a1f81fdff549d5f9d85ea0371b9a6bbfa1bf8ea (patch)
tree145ecd1d7fc92ebe1de29e129ca21941bbf5ad54
parentunbreak build on UP kernels. (diff)
downloadwireguard-openbsd-7a1f81fdff549d5f9d85ea0371b9a6bbfa1bf8ea.tar.xz
wireguard-openbsd-7a1f81fdff549d5f9d85ea0371b9a6bbfa1bf8ea.zip
kill strcpy dead
ok deraadt@
-rw-r--r--usr.sbin/bind/bin/dig/dighost.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bind/bin/dig/dighost.c b/usr.sbin/bind/bin/dig/dighost.c
index 315c45cd15e..0f9e98fdb66 100644
--- a/usr.sbin/bind/bin/dig/dighost.c
+++ b/usr.sbin/bind/bin/dig/dighost.c
@@ -3498,7 +3498,8 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org,
*/
if (idn_decodename(IDN_DECODE_APP, tmp1, tmp2, MAXDLEN) != idn_success)
return (ISC_R_SUCCESS);
- strcpy(tmp1, tmp2);
+ if (strlcpy(tmp1, tmp2, MAXDLEN) >= sizeof(tmp1))
+ return(ISC_R_NOSPACE);
/*
* Copy the converted contents in 'tmp1' back to 'buffer'.