update gettext copy.
[apps/madmutt.git] / strdup.c
index a240d82..9920a4a 100644 (file)
--- a/strdup.c
+++ b/strdup.c
@@ -1,3 +1,12 @@
+/*
+ * Copyright notice from original mutt:
+ * [none]
+ *
+ * This file is part of mutt-ng, see http://www.muttng.org/.
+ * It's licensed under the GNU General Public License,
+ * please see the file GPL in the top level source directory.
+ */
+
 /* ultrix doesn't have strdup */
 
 #include <string.h>
@@ -10,9 +19,9 @@ char *strdup (const char *s)
   if (s == NULL)
     return NULL;
 
-  if ((d = malloc (strlen (s) + 1)) == NULL)    /* __MEM_CHECKED__ */
+  if ((d = malloc (str_len (s) + 1)) == NULL)    /* __MEM_CHECKED__ */
     return NULL;
 
-  memcpy (d, s, strlen (s) + 1);
+  memcpy (d, s, str_len (s) + 1);
   return d;
 }