From 81041f8c22f05be2865dec514d23de16c3893e3f Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Sun, 2 Oct 2016 13:01:06 +0100 Subject: [PATCH] build fix for strndup / malloc Some systems don't have strndup() and rely on our version. I changed it to use Mutt's safe_malloc(), but unfortunately it gets compiled into some tools which don't have that function. --- strndup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strndup.c b/strndup.c index c560cd5ec..f130730aa 100644 --- a/strndup.c +++ b/strndup.c @@ -11,7 +11,7 @@ char *strndup(const char *s, size_t n) { size_t len = strnlen(s, n); - char *new = safe_malloc((len + 1) * sizeof(char)); + char *new = malloc((len + 1) * sizeof(char)); if (!new) return NULL; new[len] = '\0'; -- 2.49.0