diff --git a/tools/virsh.c b/tools/virsh.c index b053ed07b472e0121f89c41c762ca27f41878e47..d901d58e593f5f3ffd469e5e826847a749798028 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -11963,9 +11963,9 @@ cmdSnapshotCreateAs(vshControl *ctl, const vshCmd *cmd) virBufferAddLit(&buf, "\n"); if (name) - virBufferAsprintf(&buf, " %s\n", name); + virBufferEscapeString(&buf, " %s\n", name); if (desc) - virBufferAsprintf(&buf, " %s\n", desc); + virBufferEscapeString(&buf, " %s\n", desc); virBufferAddLit(&buf, "\n"); buffer = virBufferContentAndReset(&buf);