aboutsummaryrefslogtreecommitdiff
path: root/qemu-option.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-03-18 20:48:19 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-03-18 20:48:19 +0000
commitd35215f8085db57fea54bf7bc2d8438350440bcf (patch)
tree17521247aebe6c573fa71d8774dd193c2d922d76 /qemu-option.c
parent43dc2a645e00e6761a741e3d16c27c5b5a373b66 (diff)
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: Blue Swirl <blauwirbel@gmail.com>
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: