[libvirt] [PATCH 1/2] command: handle empty buffer argument correctly

Stefan Berger stefanb at linux.vnet.ibm.com
Sat Dec 3 21:18:53 UTC 2011


On 12/02/2011 01:50 PM, Eric Blake wrote:
> virBufferContentAndReset (intentionally) returns NULL for a buffer
> with no content, but it is feasible to invoke a command with an
> explicit empty string.
>
> * src/util/command.c (virCommandAddEnvBuffer): Reject empty string.
> (virCommandAddArgBuffer): Allow explicit empty argument.
> * tests/commandtest.c (test9): Test it.
> * tests/commanddata/test9.log: Adjust.
> ---
>   src/util/command.c          |   13 ++++++++++++-
>   tests/commanddata/test9.log |    4 +++-
>   tests/commandtest.c         |   13 ++++++++++++-
>   3 files changed, 27 insertions(+), 3 deletions(-)

ACK




More information about the libvir-list mailing list