mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
command: handle empty buffer argument correctly
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.
This commit is contained in:
@@ -2,8 +2,10 @@ ARG:-version
|
||||
ARG:-log=bar.log
|
||||
ARG:arg1
|
||||
ARG:arg2
|
||||
ARG:arg3
|
||||
ARG:
|
||||
ARG:arg4
|
||||
ARG:arg5
|
||||
ARG:arg6
|
||||
ENV:DISPLAY=:0.0
|
||||
ENV:HOME=/home/test
|
||||
ENV:HOSTNAME=test
|
||||
|
||||
Reference in New Issue
Block a user