diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-06-02 00:57:28 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-06-02 00:57:28 +0200 |
commit | 83a9433e7601cbb5d9c3eb835be1185ae69c3bfd (patch) | |
tree | 83ce8b215c33214c7ad863fa92ddc9e8ceef5eca /FICS | |
parent | bcf882f6d5621317e5b318fc604c1d69bf93f77e (diff) |
Switched to usage of memcpy()
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/utils.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/FICS/utils.c b/FICS/utils.c index b8af230..4ff3972 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -605,8 +605,11 @@ xstrdup(const char *str) if (str == NULL) return NULL; - out = rmalloc(strlen(str) + 1); - return strcpy(out, str); + + const size_t size = strlen(str) + 1; + + out = rmalloc(size); + return memcpy(out, str, size); } PUBLIC char * |