aboutsummaryrefslogtreecommitdiff
path: root/qemu-malloc.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-25 20:03:28 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-25 20:03:28 +0000
commit62dd234ff7f9874343f88f5a15118c5d4a40e5e5 (patch)
tree11d326bd43c94554209fd5c92916f3e4bd3dc876 /qemu-malloc.c
parent7621a90da8e4c8367cb44df25dfcb4e89986fed0 (diff)
Fix error introduced by r5044
qemu_strdup() doesn't copy a last character because of off by one error. Signed-off-by: Gleb Natapov <gleb@qumranet.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5086 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-malloc.c')
-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;
}