diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-04-10 17:54:34 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-04-10 17:54:34 +0200 |
commit | 8386af0420741d4baa9a41db19f6115acff6ef8e (patch) | |
tree | a6d4ec9b3dcdd97beae2ff64e8e5334ed75c784a | |
parent | f04cc2c61e1a00db4d1af1bb55ca7e20b9c3db23 (diff) | |
download | liberty-8386af0420741d4baa9a41db19f6115acff6ef8e.tar.gz liberty-8386af0420741d4baa9a41db19f6115acff6ef8e.tar.xz liberty-8386af0420741d4baa9a41db19f6115acff6ef8e.zip |
Silence an OpenBSD linker warning
-rw-r--r-- | liberty.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -292,7 +292,8 @@ xreallocarray (void *o, size_t n, size_t m) static char * xstrdup (const char *s) { - return strcpy (xmalloc (strlen (s) + 1), s); + size_t len = strlen (s) + 1; + return memcpy (xmalloc (len), s, len); } static char * |