qemu: Escape commas for qemuBuildRomStr

Add comma escaping for info->romfile.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Sukrit Bhatnagar 2018-04-17 04:26:22 +05:30 committed by John Ferlan
parent ace6528ae1
commit a55cd7193a

View 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;
}