All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Jones <rjones@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 1686364] [NEW] qemu -readconfig/-writeconfig cannot handle quotes in values
Date: Wed, 26 Apr 2017 10:25:02 -0000	[thread overview]
Message-ID: <20170426102503.20345.45815.malonedeb@soybean.canonical.com> (raw)

Public bug reported:

$ qemu-system-x86_64 -drive file=/tmp/foo\" -writeconfig -
# qemu config file

[drive]
  file = "/tmp/foo""

For bonus points, try to construct a valid qemu config file that
contains a quoted value.  It's pretty clear (from looking at the code
also) that this is not possible.

Also:

- maximum value length is hard-coded in the parser at 1023 characters
(for no apparent reason)

- the format is undocumented

- don't use sscanf for parsing!

** Affects: qemu
     Importance: Undecided
         Status: New

** Description changed:

  $ qemu-system-x86_64 -drive file=/tmp/foo\" -writeconfig -
  # qemu config file
  
  [drive]
-   file = "/tmp/foo""
+   file = "/tmp/foo""
  
- For bonus points, try to construct a value qemu config file that
+ For bonus points, try to construct a valid qemu config file that
  contains a quoted value.  It's pretty clear (from looking at the code
  also) that this is not possible.
  
  Also:
  
  - maximum value length is hard-coded in the parser at 1023 characters
  (for no apparent reason)
  
  - the format is undocumented
  
  - don't use sscanf for parsing!

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1686364

Title:
  qemu -readconfig/-writeconfig cannot handle quotes in values

Status in QEMU:
  New

Bug description:
  $ qemu-system-x86_64 -drive file=/tmp/foo\" -writeconfig -
  # qemu config file

  [drive]
    file = "/tmp/foo""

  For bonus points, try to construct a valid qemu config file that
  contains a quoted value.  It's pretty clear (from looking at the code
  also) that this is not possible.

  Also:

  - maximum value length is hard-coded in the parser at 1023 characters
  (for no apparent reason)

  - the format is undocumented

  - don't use sscanf for parsing!

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1686364/+subscriptions

             reply	other threads:[~2017-04-26 10:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 10:25 Richard Jones [this message]
2017-04-26 12:17 ` [Qemu-devel] [Bug 1686364] [NEW] qemu -readconfig/-writeconfig cannot handle quotes in values Markus Armbruster
2021-05-05  6:57 ` [Bug 1686364] " Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170426102503.20345.45815.malonedeb@soybean.canonical.com \
    --to=rjones@redhat.com \
    --cc=1686364@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.