From a55cd7193a8faddfdf81dea01d4387751274709d Mon Sep 17 00:00:00 2001 From: Sukrit Bhatnagar Date: Tue, 17 Apr 2018 04:26:22 +0530 Subject: [PATCH] qemu: Escape commas for qemuBuildRomStr Add comma escaping for info->romfile. Signed-off-by: Sukrit Bhatnagar Reviewed-by: John Ferlan --- src/qemu/qemu_command.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b7920979e6..c432fef885 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -459,8 +459,10 @@ qemuBuildRomStr(virBufferPtr buf, default: break; } - if (info->romfile) - virBufferAsprintf(buf, ",romfile=%s", info->romfile); + if (info->romfile) { + virBufferAddLit(buf, ",romfile="); + virQEMUBuildBufferEscapeComma(buf, info->romfile); + } } return 0; } -- GitLab