提交 62dd234f 编写于 作者: B blueswir1

Fix error introduced by r5044

qemu_strdup() doesn't copy a last character because of off by one error.
Signed-off-by: NGleb Natapov <gleb@qumranet.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5086 c046a42c-6fe2-441c-8c8c-71466251a162
上级 7621a90d
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册