aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qemu-malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-malloc.c b/qemu-malloc.c
index 8ad616847a..3bffae1fbb 100644
--- a/qemu-malloc.c
+++ b/qemu-malloc.c
@@ -60,6 +60,6 @@ char *qemu_strdup(const char *str)
ptr = qemu_malloc(len + 1);
if (!ptr)
return NULL;
- pstrcpy(ptr, len, str);
+ pstrcpy(ptr, len + 1, str);
return ptr;
}