summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-09-11 11:44:58 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-09-11 13:19:12 +0200
commit6aaf25c758790f99cb3ab3d74b5c5addac8de2b7 (patch)
treec7f4535905b73965445ac721cd6f5aead2315c1b /lib
parentd360d39c53c36a105be07cdbecdb804a9df3112e (diff)
downloadgnutls-6aaf25c758790f99cb3ab3d74b5c5addac8de2b7.tar.gz
avoid the usage of strncpy
Diffstat (limited to 'lib')
-rw-r--r--lib/str.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/str.c b/lib/str.c
index dbe8feffc4..e78383fd07 100644
--- a/lib/str.c
+++ b/lib/str.c
@@ -60,7 +60,7 @@ void _gnutls_str_cpy(char *dest, size_t dest_tot_size, const char *src)
strcpy(dest, src);
} else {
if (dest_tot_size > 0) {
- strncpy(dest, src, (dest_tot_size) - 1);
+ memcpy(dest, src, (dest_tot_size) - 1);
dest[dest_tot_size - 1] = 0;
}
}