qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Bug 1686364] [NEW] qemu -readconfig/-writeconfig canno


From: Markus Armbruster
Subject: Re: [Qemu-devel] [Bug 1686364] [NEW] qemu -readconfig/-writeconfig cannot handle quotes in values
Date: Wed, 26 Apr 2017 14:17:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Richard Jones <address@hidden> 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!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]