[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 1/5] qtest: allow arbitrarily long sends
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 1/5] qtest: allow arbitrarily long sends |
Date: |
Tue, 05 May 2015 17:22:17 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 05/05/2015 04:22 PM, John Snow wrote:
> qtest currently has a static buffer of size 1024 that if we
> overflow, ignores the additional data silently which leads
> to hangs or stream failures.
>
> Use glib's string facilities to allow arbitrarily long data,
> but split this off into a new function, qtest_sendf.
>
> Static data can still be sent using qtest_send, which avoids
> the malloc/copy overflow.
Did you mean 'overhead' instead of 'overflow'?
>
> Signed-off-by: John Snow <address@hidden>
> ---
> qtest.c | 46 ++++++++++++++++++++++++++++------------------
> 1 file changed, 28 insertions(+), 18 deletions(-)
>
> qtest_send_prefix(chr);
> - qtest_send(chr, "FAIL Unknown command `%s'\n", words[0]);
> + qtest_sendf(chr, "FAIL Unknown command `%s'\n", words[0]);
> }
Unrelated - these days, I don't see `this' quoting much any more (except
in m4); most people have moved to 'this' quoting. We could clean it
while touching this line, but it really doesn't affect correctness
either way.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v3 4/5] qtest: precompute hex nibs, (continued)
- Re: [Qemu-devel] [PATCH v3 4/5] qtest: precompute hex nibs, John Snow, 2015/05/06
- Re: [Qemu-devel] [PATCH v3 4/5] qtest: precompute hex nibs, Markus Armbruster, 2015/05/06
- Re: [Qemu-devel] [PATCH v3 4/5] qtest: precompute hex nibs, John Snow, 2015/05/06
- Re: [Qemu-devel] [PATCH v3 4/5] qtest: precompute hex nibs, Markus Armbruster, 2015/05/07
- Re: [Qemu-devel] [PATCH v3 4/5] qtest: precompute hex nibs, John Snow, 2015/05/07
- Re: [Qemu-devel] [PATCH v3 4/5] qtest: precompute hex nibs, Eric Blake, 2015/05/07
- Re: [Qemu-devel] [PATCH v3 4/5] qtest: precompute hex nibs, Markus Armbruster, 2015/05/08
- Re: [Qemu-devel] [PATCH v3 4/5] qtest: precompute hex nibs, John Snow, 2015/05/08
- Re: [Qemu-devel] [PATCH v3 4/5] qtest: precompute hex nibs, Eric Blake, 2015/05/08
[Qemu-devel] [PATCH v3 1/5] qtest: allow arbitrarily long sends, John Snow, 2015/05/05
- Re: [Qemu-devel] [PATCH v3 1/5] qtest: allow arbitrarily long sends,
Eric Blake <=
[Qemu-devel] [PATCH v3 3/5] qtest: add memset to qtest protocol, John Snow, 2015/05/05
[Qemu-devel] [PATCH v3 2/5] qtest: Add base64 encoded read/write, John Snow, 2015/05/05
[Qemu-devel] [PATCH v3 5/5] libqos/ahci: Swap memread/write with bufread/write, John Snow, 2015/05/05
Re: [Qemu-devel] [PATCH v3 0/5] qtest: base64 r/w and faster memset, Paolo Bonzini, 2015/05/06