diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-03-18 20:48:19 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-03-18 20:48:19 +0000 |
commit | d35215f8085db57fea54bf7bc2d8438350440bcf (patch) | |
tree | 17521247aebe6c573fa71d8774dd193c2d922d76 /qemu-option.c | |
parent | 43dc2a645e00e6761a741e3d16c27c5b5a373b66 (diff) | |
download | hqemu-d35215f8085db57fea54bf7bc2d8438350440bcf.zip hqemu-d35215f8085db57fea54bf7bc2d8438350440bcf.tar.gz |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qemu-option.c b/qemu-option.c index dc340b8..f83d07c1 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: |