]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Escape commas for qemuBuildRomStr
authorSukrit Bhatnagar <skrtbhtngr@gmail.com>
Mon, 16 Apr 2018 22:56:22 +0000 (04:26 +0530)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 17 Apr 2018 17:26:21 +0000 (13:26 -0400)
Add comma escaping for info->romfile.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_command.c

index b7920979e612827e06ebf9b19a136c26cac9e7b4..c432fef8850c00cb244a9856675a40fe83cc3502 100644 (file)
@@ -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;
 }