Re: [Qemu-devel] KVM call minutes for Feb 15

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

 



On 02/16/2011 03:34 PM, Anthony Liguori wrote:
On 02/16/2011 04:24 AM, Avi Kivity wrote:
On 02/16/2011 01:13 AM, Anthony Liguori wrote:
On 02/15/2011 10:26 AM, Chris Wright wrote:
QAPI and QMP
- Anthony adding a new wiki page to describe all of this

http://wiki.qemu.org/Features/QAPI


[ 'change', {'device': 'str', 'target': 'str'}, {'arg': 'str'}, 'none' ]
    ->
void qmp_change(const char *device, const char *target, bool has_arg, const char *arg, Error **errp);

AFAICT a json-string allows embedded NULs ('\0000'). There translate to UTF-8 as '\0', terminating your char *s. Either we use some length/pointer structure, or the parser has to look for them and kill them, and we have to specify them as verboten.

I feel like it would be safer for us to not accept strings with embedded NULs. There's no way we're going to consistently handle this correctly in QEMU since we expect NUL terminated strings. They won't work for any of the standard C functions either.

I agree. Technically we're making a backwards incompatible change to the protocol specification, but I don't think there's any risk that somebody is sending in strings with NULs.

(btw what happens in a non-UTF-8 locale? I guess we should just reject unencodable strings).

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux