]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tools: Fix comparison in virLoginShellGetShellArgv
authorJohn Ferlan <jferlan@redhat.com>
Mon, 18 Jul 2016 18:07:42 +0000 (14:07 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 19 Jul 2016 11:51:10 +0000 (07:51 -0400)
commitdfb18b0afbb040a496ddce1f224176a97f8a5667
tree63f966725d5c2371e5cf1b92c726e591c346a9b2
parentfee696b6e8f932c7160bc09c8c1d23383b87138a
tools: Fix comparison in virLoginShellGetShellArgv

Commit id '740e4d70' altered the logic to fetch the sysconf values and
added a new virConfGetValueStringList which returns -1 on failure, 0 if
missing, and 1 if the value was present.

However, the caller only checked !shargv which caught Coverity's attention
since the following VIR_ALLOC_N(*shargv, 2) would be a NULL ptr deref

Signed-off-by: John Ferlan <jferlan@redhat.com>
tools/virt-login-shell.c