diff --git a/src/memory.c b/src/memory.c index a3d9aaf..eb6cec5 100644 --- a/src/memory.c +++ b/src/memory.c @@ -45,7 +45,7 @@ char *jsonp_strdup(const char *str) if(!new_str) return NULL; - strcpy(new_str, str); + memcpy(new_str, str, len + 1); return new_str; }