提交 d35215f8 编写于 作者: B Blue Swirl

Fix OpenBSD linker warning

qemu-option.o(.text+0x20f8): In function `qemu_opts_from_qdict_1':
/src/qemu/qemu-option.c:813: warning: strcpy() is almost always misused, please use strlcpy()
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 43dc2a64
......@@ -810,7 +810,8 @@ static void qemu_opts_from_qdict_1(const char *key, QObject *obj, void *opaque)
value = buf;
break;
case QTYPE_QBOOL:
strcpy(buf, qbool_get_int(qobject_to_qbool(obj)) ? "on" : "off");
pstrcpy(buf, sizeof(buf),
qbool_get_int(qobject_to_qbool(obj)) ? "on" : "off");
value = buf;
break;
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册