summaryrefslogtreecommitdiff
path: root/libc/string/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/string.c')
-rw-r--r--libc/string/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/string/string.c b/libc/string/string.c
index 50b7145..3e6d2e4 100644
--- a/libc/string/string.c
+++ b/libc/string/string.c
@@ -343,7 +343,7 @@ char * s;
register char * p;
len = strlen(s)+1;
- p = (char *) malloc(s);
+ p = (char *) malloc(len);
if(p) memcpy(p, s, len); /* Faster than strcpy */
return p;
}