[libvirt] [PATCH 00/10] Resolve CHECKED_RETURN errors found by Coverity

John Ferlan jferlan at redhat.com
Thu Jan 3 19:16:12 UTC 2013


Bug: https://bugzilla.redhat.com/show_bug.cgi?id=880388

This set of patches resolves the "CHECKED_RETURN (CWE-252)" errors found
by Coverity.


John Ferlan (10):
  interface: Check and handle error for virAsprintf() calls.
  parallels: Check and handle error for virAsprintf() calls. Ignore the return 
       inparallelsMakePoolName() since subsequent check validates name
       was allocated.
  rpc: Check status when attempting to set SO_REUSEADDR flag on outgoing
       connection. On failure, VIR_WARN(), but continue to connect.
  vmware: Ignore the return status check for vmwareUpdateVMStatus in
       convenience routine vmwareDomainObjListUpdateDomain
  xen: Check return status for setting TCP_NODELAY option and generate a
       VIR_DEBUG message on failure. Allow connection to continue.
  virlockspacetest: Check return on mkdir for LOCKSPACE_DIR
  vmx2xmltest: Check and handle error for virAsprintf() calls.
  xml2vmxtest: Check and handle error for virAsprintf() calls.
  virsh: Ignore error returns for virBufferTrim().
  phyp: Check and handle select() errors from waitsocket().

 src/interface/interface_backend_udev.c |  5 ++--
 src/parallels/parallels_storage.c      |  5 ++--
 src/phyp/phyp_driver.c                 | 42 ++++++++++++++++++++++++++--------
 src/rpc/virnetsocket.c                 |  4 +++-
 src/vmware/vmware_driver.c             |  2 +-
 src/xen/xend_internal.c                |  6 +++--
 tests/virlockspacetest.c               |  3 ++-
 tests/vmx2xmltest.c                    |  7 ++++--
 tests/xml2vmxtest.c                    |  5 ++--
 tools/virsh.c                          |  4 ++--
 10 files changed, 56 insertions(+), 27 deletions(-)

-- 
1.7.11.7




More information about the libvir-list mailing list