aboutsummaryrefslogtreecommitdiff
path: root/qemu-option.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-option.c')
-rw-r--r--qemu-option.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/qemu-option.c b/qemu-option.c
index dc340b8dc7..f83d07c1e7 100644
--- a/qemu-option.c
+++ b/qemu-option.c
@@ -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: