Commit 62dd234ff7f9874343f88f5a15118c5d4a40e5e5

Authored by blueswir1
1 parent 7621a90d

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
Showing 1 changed file with 1 additions and 1 deletions
qemu-malloc.c
... ... @@ -60,6 +60,6 @@ char *qemu_strdup(const char *str)
60 60 ptr = qemu_malloc(len + 1);
61 61 if (!ptr)
62 62 return NULL;
63   - pstrcpy(ptr, len, str);
  63 + pstrcpy(ptr, len + 1, str);
64 64 return ptr;
65 65 }
... ...