diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-09-11 11:44:58 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-09-11 13:19:12 +0200 |
commit | 6aaf25c758790f99cb3ab3d74b5c5addac8de2b7 (patch) | |
tree | c7f4535905b73965445ac721cd6f5aead2315c1b /lib/str.c | |
parent | d360d39c53c36a105be07cdbecdb804a9df3112e (diff) | |
download | gnutls-6aaf25c758790f99cb3ab3d74b5c5addac8de2b7.tar.gz |
avoid the usage of strncpy
Diffstat (limited to 'lib/str.c')
-rw-r--r-- | lib/str.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } } |