[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 30/38] qtest: Avoid passing raw strings throu
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH v7 30/38] qtest: Avoid passing raw strings through hmp() |
Date: |
Tue, 12 Sep 2017 12:40:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 11.09.2017 19:20, Eric Blake wrote:
> hmp() passes its string argument through the sprintf() family;
> with a proper attribute, gcc -Wformat warns us when we do something
> dangerous like passing a non-constant format string. Fortunately,
> all our strings were safe, but checking whether the string can
> contain an unintended % is easy to avoid and therefore worth doing.
>
> Signed-off-by: Eric Blake <address@hidden>
>
> ---
> v7: add GCC_FMT_ATTR here, drop R-b
> ---
> tests/libqtest.h | 8 ++++----
> tests/test-hmp.c | 4 ++--
> 2 files changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Thomas Huth <address@hidden>
- Re: [Qemu-devel] [PATCH v7 17/38] libqos: Use explicit QTestState for remaining libqos operations, (continued)
- [Qemu-devel] [PATCH v7 23/38] tests/boot-sector: Drop dependence on global_qtest, Eric Blake, 2017/09/11
- [Qemu-devel] [PATCH v7 24/38] tests/acpi-utils: Drop dependence on global_qtest, Eric Blake, 2017/09/11
- [Qemu-devel] [PATCH v7 25/38] wdt_ib700-test: Drop dependence on global_qtest, Eric Blake, 2017/09/11
- [Qemu-devel] [PATCH v7 27/38] libqtest: Swap order of qtest_init() and qtest_start(), Eric Blake, 2017/09/11
- [Qemu-devel] [PATCH v7 30/38] qtest: Avoid passing raw strings through hmp(), Eric Blake, 2017/09/11
- [Qemu-devel] [PATCH v7 26/38] libqtest: Merge qtest_end() into qtest_quit(), Eric Blake, 2017/09/11
- [Qemu-devel] [PATCH v7 28/38] libqtest: Add qtest_[v]startf(), Eric Blake, 2017/09/11
- [Qemu-devel] [PATCH v7 29/38] libqtest: Merge qtest_init() into qtest_start(), Eric Blake, 2017/09/11
- [Qemu-devel] [PATCH v7 32/38] libqtest: Merge qtest_irq*() with irq*(), Eric Blake, 2017/09/11