X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=strdup.c;h=9920a4acb728326a1ec6b8d32b27a4144a32785a;hp=f154b887f76652aa8e41bc42d77e2d7a79195235;hb=4b74d7b93a04e3dff8054a97b3f41254719d352d;hpb=c3e57678c8be193fc137854020f3a90887be97c9 diff --git a/strdup.c b/strdup.c index f154b88..9920a4a 100644 --- a/strdup.c +++ b/strdup.c @@ -19,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; }