Re: [Qemu-devel] [PATCH for-2.7] qtest.c: Allow zero size in memset qtest commands

2016-09-09 Thread Peter Maydell
On 8 September 2016 at 15:37, Eric Blake wrote: > On 08/05/2016 05:43 AM, Peter Maydell wrote: >> Some tests use the qtest protocol "memset" command with a zero >> size, expecting it to do nothing. However in the current code this >> will result in calling memset() with a NULL

Re: [Qemu-devel] [PATCH for-2.7] qtest.c: Allow zero size in memset qtest commands

2016-09-08 Thread Eric Blake
On 08/05/2016 05:43 AM, Peter Maydell wrote: > Some tests use the qtest protocol "memset" command with a zero > size, expecting it to do nothing. However in the current code this > will result in calling memset() with a NULL pointer, which is > undefined behaviour. Detect and specially handle zero

Re: [Qemu-devel] [PATCH for-2.7] qtest.c: Allow zero size in memset qtest commands

2016-09-06 Thread Peter Maydell
Ping? (Now that 2.7 is out it would be nice to get rid of the clang warnings cluttering up my build logs :-)) thanks -- PMM On 5 August 2016 at 11:43, Peter Maydell wrote: > Some tests use the qtest protocol "memset" command with a zero > size, expecting it to do

[Qemu-devel] [PATCH for-2.7] qtest.c: Allow zero size in memset qtest commands

2016-08-05 Thread Peter Maydell
Some tests use the qtest protocol "memset" command with a zero size, expecting it to do nothing. However in the current code this will result in calling memset() with a NULL pointer, which is undefined behaviour. Detect and specially handle zero sizes to avoid this. Signed-off-by: Peter Maydell