All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1686364] [NEW] qemu -readconfig/-writeconfig cannot handle quotes in values
@ 2017-04-26 10:25 Richard Jones
  2017-04-26 12:17 ` Markus Armbruster
  2021-05-05  6:57 ` [Bug 1686364] " Thomas Huth
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Jones @ 2017-04-26 10:25 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [Bug 1686364] [NEW] qemu -readconfig/-writeconfig cannot handle quotes in values
  2017-04-26 10:25 [Qemu-devel] [Bug 1686364] [NEW] qemu -readconfig/-writeconfig cannot handle quotes in values Richard Jones
@ 2017-04-26 12:17 ` Markus Armbruster
  2021-05-05  6:57 ` [Bug 1686364] " Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2017-04-26 12:17 UTC (permalink / raw)
  To: Richard Jones; +Cc: qemu-devel, Bug 1686364

Richard Jones <rjones@redhat.com> writes:

> 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

Perhaps for the better, as -readconfig and -writeconfig are seriously
limited in serveral ways.

The format is Windows INI, which is as poorly specified as it's
widespread.

I intend to work on more capable configuration file support, but it'll
take some time.

> - 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!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug 1686364] Re: qemu -readconfig/-writeconfig cannot handle quotes in values
  2017-04-26 10:25 [Qemu-devel] [Bug 1686364] [NEW] qemu -readconfig/-writeconfig cannot handle quotes in values Richard Jones
  2017-04-26 12:17 ` Markus Armbruster
@ 2021-05-05  6:57 ` Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2021-05-05  6:57 UTC (permalink / raw)
  To: qemu-devel

This is an automated cleanup. This bug report has been moved to QEMU's
new bug tracker on gitlab.com and thus gets marked as 'expired' now.
Please continue with the discussion here:

 https://gitlab.com/qemu-project/qemu/-/issues/142


** Changed in: qemu
       Status: New => Expired

** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #142
   https://gitlab.com/qemu-project/qemu/-/issues/142

-- 
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:
  Expired

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-05  7:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26 10:25 [Qemu-devel] [Bug 1686364] [NEW] qemu -readconfig/-writeconfig cannot handle quotes in values Richard Jones
2017-04-26 12:17 ` Markus Armbruster
2021-05-05  6:57 ` [Bug 1686364] " Thomas Huth

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.