[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 16/28] qapi: Make string input and opts visit
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v4 16/28] qapi: Make string input and opts visitor require non-null input |
Date: |
Tue, 07 Mar 2017 08:47:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Philippe Mathieu-Daudé <address@hidden> writes:
> On 03/03/2017 09:32 AM, Markus Armbruster wrote:
>> The string input visitor tries to cope with null input. Null input
>> isn't used anywhere, and isn't covered by tests. Unsurprisingly, it
>> doesn't fully work: start_list() crashes because it passes the input
>> via parse_str() to strtoll() unchecked.
>>
>> Make string_input_visitor_new() assert its argument isn't null, and
>> drop the code trying to deal with null input.
>>
>> The opts visitor crashes when you try to actually visit something with
>> null input. Make opts_visitor_new() assert its argument isn't null,
>> mostly for clarity.
>>
>> qobject_input_visitor_new() already asserts its argument isn't null.
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> Reviewed-by: Eric Blake <address@hidden>
>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Since the series has been merged already, there's no way for me to
record your review with the commit. Thanks anyway!
- [Qemu-devel] [PATCH v4 02/28] libqtest: Work around a "QMP wants a newline" bug, (continued)
- [Qemu-devel] [PATCH v4 02/28] libqtest: Work around a "QMP wants a newline" bug, Markus Armbruster, 2017/03/03
- [Qemu-devel] [PATCH v4 22/28] test-string-input-visitor: Improve list coverage, Markus Armbruster, 2017/03/03
- [Qemu-devel] [PATCH v4 14/28] qapi: Improve qobject input visitor error reporting, Markus Armbruster, 2017/03/03
- [Qemu-devel] [PATCH v4 20/28] tests-qobject-input-strict: Merge into test-qobject-input-visitor, Markus Armbruster, 2017/03/03
- [Qemu-devel] [PATCH v4 07/28] qmp: Clean up how we enforce capability negotiation, Markus Armbruster, 2017/03/03
- [Qemu-devel] [PATCH v4 16/28] qapi: Make string input and opts visitor require non-null input, Markus Armbruster, 2017/03/03
[Qemu-devel] [PATCH v4 05/28] qapi: Support multiple command registries per program, Markus Armbruster, 2017/03/03
Re: [Qemu-devel] [PATCH v4 00/28] qapi: QMP dispatch and input visitor work, no-reply, 2017/03/03