aboutsummaryrefslogtreecommitdiffstats
path: root/src/string/strn
diff options
context:
space:
mode:
Diffstat (limited to 'src/string/strn')
-rw-r--r--src/string/strn/strndup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/strn/strndup.c b/src/string/strn/strndup.c
index 7d6e565..5dc17e0 100644
--- a/src/string/strn/strndup.c
+++ b/src/string/strn/strndup.c
@@ -39,7 +39,7 @@
char* strndup(const char* string, size_t maxlen)
{
size_t n = strnlen(string, maxlen) + 1;
- char* r = malloc(n * sizeof(char));
+ char* r = aligned_alloc(1, n * sizeof(char));
return r == NULL ? NULL : memcpy(r, string, n * sizeof(char));
}