Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 602408 Details for
Bug 825903
Coverity scan relevant defects
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
CoverityScan on libvirt-0.10.0-0rc0.el6.src.rpm
libvirt-0.10.0-0rc0.el6.err (text/plain), 24.91 KB, created by
Alex Jia
on 2012-08-06 05:15:29 UTC
(
hide
)
Description:
CoverityScan on libvirt-0.10.0-0rc0.el6.src.rpm
Filename:
MIME Type:
Creator:
Alex Jia
Created:
2012-08-06 05:15:29 UTC
Size:
24.91 KB
patch
obsolete
>Error: CHECKED_RETURN (CWE-252): >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:106: example_checked: "pciDeviceListAdd(list, activeDev)" has its value checked in "pciDeviceListAdd(list, activeDev) < 0". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:63: example_checked: "pciDeviceListAdd(list, dev)" has its value checked in "pciDeviceListAdd(list, dev) < 0". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:466: example_checked: "pciDeviceListAdd(driver->activePciHostdevs, dev)" has its value checked in "pciDeviceListAdd(driver->activePciHostdevs, dev) < 0". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:153: example_checked: "pciDeviceListAdd(driver->activePciHostdevs, dev)" has its value checked in "pciDeviceListAdd(driver->activePciHostdevs, dev) < 0". >/builddir/build/BUILD/libvirt-0.10.0/src/util/pci.c:1133: example_checked: "pciDeviceListAdd(inactiveDevs, dev)" has its value checked in "pciDeviceListAdd(inactiveDevs, dev) < 0". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:732: check_return: Calling function "pciDeviceListAdd" without checking return value (as is done elsewhere 5 out of 6 times). >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:732: unchecked_value: No check of the return value of "pciDeviceListAdd(driver->inactivePciHostdevs, dev)". > >Error: CHECKED_RETURN (CWE-252): >/builddir/build/BUILD/libvirt-0.10.0/tools/virsh-domain.c:3491: example_checked: "pthread_sigmask(0, &sigmask, &oldsigmask)" has its value checked in "pthread_sigmask(0, &sigmask, &oldsigmask) < 0". >/builddir/build/BUILD/libvirt-0.10.0/tools/virsh-domain.c:3022: example_checked: "pthread_sigmask(0, &sigmask, &oldsigmask)" has its value checked in "pthread_sigmask(0, &sigmask, &oldsigmask) < 0". >/builddir/build/BUILD/libvirt-0.10.0/tools/virsh-domain.c:6328: example_checked: "pthread_sigmask(0, &sigmask, &oldsigmask)" has its value checked in "pthread_sigmask(0, &sigmask, &oldsigmask) < 0". >/builddir/build/BUILD/libvirt-0.10.0/tools/virsh-domain.c:2729: example_checked: "pthread_sigmask(0, &sigmask, &oldsigmask)" has its value checked in "pthread_sigmask(0, &sigmask, &oldsigmask) < 0". >/builddir/build/BUILD/libvirt-0.10.0/tools/virsh-domain.c:6502: check_return: Calling function "pthread_sigmask" without checking return value (as is done elsewhere 4 out of 5 times). >/builddir/build/BUILD/libvirt-0.10.0/tools/virsh-domain.c:6502: unchecked_value: No check of the return value of "pthread_sigmask(0, &sigmask, &oldsigmask)". > >Error: CHECKED_RETURN (CWE-252): >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd-config.c:209: example_checked: "virAsprintf(configfile, "%s/libvirtd.conf", configdir)" has its value checked in "virAsprintf(configfile, "%s/libvirtd.conf", configdir) < 0". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd-config.c:299: example_assign: Assigning: "ret" = return value from "virAsprintf(&data->mdns_name, "Virtualization Host")". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd-config.c:309: example_checked: "ret" has its value checked in "ret < 0". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd-config.c:305: example_assign: Assigning: "ret" = return value from "virAsprintf(&data->mdns_name, "Virtualization Host %s", localhost)". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd-config.c:309: example_checked: "ret" has its value checked in "ret < 0". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd.c:255: example_checked: "virAsprintf(pidfile, "%s/libvirtd.pid", rundir)" has its value checked in "virAsprintf(pidfile, "%s/libvirtd.pid", rundir) < 0". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd.c:639: example_checked: "virAsprintf(&tmp, "%d:file:%s/log/libvirt/libvirtd.log", virLogGetDefaultPriority(), "/var")" has its value checked in "virAsprintf(&tmp, "%d:file:%s/log/libvirt/libvirtd.log", virLogGetDefaultPriority(), "/var") == -1". >/builddir/build/BUILD/libvirt-0.10.0/src/security/security_selinux.c:1604: check_return: Calling function "virAsprintf" without checking return value (as is done elsewhere 424 out of 448 times). >/builddir/build/BUILD/libvirt-0.10.0/src/security/security_selinux.c:1604: unchecked_value: No check of the return value of "virAsprintf(&opts, ",context=\"%s\"", (char const *)secdef->imagelabel)". > >Error: DEADCODE (CWE-561): >/builddir/build/BUILD/libvirt-0.10.0/gnulib/lib/strerror_r.c:154: dead_error_condition: On this path, the condition "msg" cannot be true. >/builddir/build/BUILD/libvirt-0.10.0/gnulib/lib/strerror_r.c:152: const: After this line, the value of "msg" is equal to 0. >/builddir/build/BUILD/libvirt-0.10.0/gnulib/lib/strerror_r.c:152: assignment: Assigning: "msg" = "NULL". >/builddir/build/BUILD/libvirt-0.10.0/gnulib/lib/strerror_r.c:155: dead_error_line: Execution cannot reach this statement "return safe_copy(buf, bufle...". > >Error: DEADCODE (CWE-561): >/builddir/build/BUILD/libvirt-0.10.0/gnulib/lib/strerror.c:45: dead_error_condition: On this path, the condition "msg" cannot be true. >/builddir/build/BUILD/libvirt-0.10.0/gnulib/lib/strerror.c:44: const: After this line, the value of "msg" is equal to 0. >/builddir/build/BUILD/libvirt-0.10.0/gnulib/lib/strerror.c:44: assignment: Assigning: "msg" = "NULL". >/builddir/build/BUILD/libvirt-0.10.0/gnulib/lib/strerror.c:46: dead_error_line: Execution cannot reach this statement "return (char *)msg;". > >Error: DEADCODE (CWE-561): >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetclient.c:362: dead_error_condition: On this path, the condition "ka" cannot be true. >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetclient.c:304: const: After this line, the value of "ka" is equal to 0. >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetclient.c:342: const: After this line, the value of "ka" is equal to 0. >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetclient.c:304: assignment: Assigning: "ka" = "NULL". >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetclient.c:342: new_values: Noticing condition "ka = virKeepAliveNew(-1, 0U, client, virNetClientKeepAliveSendCB, virNetClientKeepAliveDeadCB, virNetClientEventFree)". >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetclient.c:363: dead_error_begin: Execution cannot reach this statement "virKeepAliveStop(ka);". > >Error: DEADCODE (CWE-561): >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetserverclient.c:1204: dead_error_condition: On this path, the condition "ka" cannot be true. >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetserverclient.c:1191: const: After this line, the value of "ka" is equal to 0. >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetserverclient.c:1200: const: After this line, the value of "ka" is equal to 0. >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetserverclient.c:1200: assignment: Assigning: "ka" = "NULL". >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetserverclient.c:1191: new_values: Noticing condition "ka = virKeepAliveNew(interval, count, client, virNetServerClientKeepAliveSendCB, virNetServerClientKeepAliveDeadCB, virNetServerClientFreeCB)". >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetserverclient.c:1205: dead_error_line: Execution cannot reach this statement "virKeepAliveStop(ka);". > >Error: DEADCODE (CWE-561): >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_driver.c:8274: dead_error_condition: On this path, the condition "group" cannot be true. >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_driver.c:8169: const: After this line, the value of "group" is equal to 0. >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_driver.c:8169: assignment: Assigning: "group" = "NULL". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_driver.c:8275: dead_error_line: Execution cannot reach this statement "virCgroupFree(&group);". > >Error: DEADCODE (CWE-561): >/builddir/build/BUILD/libvirt-0.10.0/src/nwfilter/nwfilter_driver.c:94: dead_error_condition: On this path, the condition "privileged" cannot be false. >/builddir/build/BUILD/libvirt-0.10.0/src/nwfilter/nwfilter_driver.c:81: cannot_single: After this line (or expression), the value of "privileged" cannot be 0. >/builddir/build/BUILD/libvirt-0.10.0/src/nwfilter/nwfilter_driver.c:98: dead_error_begin: Execution cannot reach this statement "base = virGetUserConfigDire...". > >Error: FORWARD_NULL (CWE-476): >/builddir/build/BUILD/libvirt-0.10.0/src/nwfilter/nwfilter_dhcpsnoop.c:575: var_compare_op: Comparing "ifkey" to null implies that "ifkey" might be null. >/builddir/build/BUILD/libvirt-0.10.0/src/nwfilter/nwfilter_dhcpsnoop.c:576: var_deref_model: Passing null variable "ifkey" to function "strlen", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) > >Error: FORWARD_NULL (CWE-476): >/builddir/build/BUILD/libvirt-0.10.0/src/conf/storage_conf.c:444: var_compare_op: Comparing "uuid" to null implies that "uuid" might be null. >/builddir/build/BUILD/libvirt-0.10.0/src/conf/storage_conf.c:450: var_deref_model: Passing null variable "uuid" to function "virUUIDParse", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) > >Error: FORWARD_NULL (CWE-476): >/builddir/build/BUILD/libvirt-0.10.0/src/remote/remote_driver.c:3104: assign_zero: Assigning: "credname" = 0. >/builddir/build/BUILD/libvirt-0.10.0/src/remote/remote_driver.c:3108: var_deref_model: Passing null variable "credname" to function "virAuthConfigLookup", which dereferences it. >/builddir/build/BUILD/libvirt-0.10.0/src/util/virauthconfig.c:158: deref_parm_in_call: Function "virKeyFileHasValue" dereferences parameter "credname". (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) > >Error: FORWARD_NULL (CWE-476): >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hotplug.c:2292: var_compare_op: Comparing "detach->ifname" to null implies that "detach->ifname" might be null. >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hotplug.c:2304: var_deref_model: Passing null variable "detach->ifname" to function "virNetDevOpenvswitchRemovePort", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) > >Error: FORWARD_NULL (CWE-476): >/builddir/build/BUILD/libvirt-0.10.0/src/lxc/lxc_container.c:1319: assign_zero: Assigning: "dh" = 0. >/builddir/build/BUILD/libvirt-0.10.0/src/lxc/lxc_container.c:1409: var_deref_model: Passing null variable "dh" to function "closedir", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) > >Error: FORWARD_NULL (CWE-476): >/builddir/build/BUILD/libvirt-0.10.0/src/lxc/lxc_container.c:1356: var_compare_op: Comparing "dh" to null implies that "dh" might be null. >/builddir/build/BUILD/libvirt-0.10.0/src/lxc/lxc_container.c:1409: var_deref_model: Passing null variable "dh" to function "closedir", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) > >Error: MISSING_RETURN: >/tmp/tmpCEg5fo.c:1: missing_return: Arriving at the end of a function without returning a value. > >Error: MISSING_RETURN: >/tmp/tmpimL8NL.c:1: missing_return: Arriving at the end of a function without returning a value. > >Error: NEGATIVE_RETURNS (CWE-394): >/builddir/build/BUILD/libvirt-0.10.0/src/util/buf.c:159: negative_return_fn: Function "virBufferGetIndent(buf, true)" returns a negative number. >/builddir/build/BUILD/libvirt-0.10.0/src/util/buf.c:101: return_negative_constant: Explicitly returning negative value "-1". >/builddir/build/BUILD/libvirt-0.10.0/src/util/buf.c:159: var_assign: Assigning: signed variable "indent" = "virBufferGetIndent". >/builddir/build/BUILD/libvirt-0.10.0/src/util/buf.c:169: negative_returns: "indent" is passed to a parameter that cannot be negative. > >Error: NEGATIVE_RETURNS (CWE-394): >/builddir/build/BUILD/libvirt-0.10.0/src/conf/storage_conf.c:502: negative_return_fn: Function "virXPathNodeSet("./host", ctxt, &nodeset)" returns a negative number. >/builddir/build/BUILD/libvirt-0.10.0/src/util/xml.c:575: return_negative_constant: Explicitly returning negative value "-1". >/builddir/build/BUILD/libvirt-0.10.0/src/conf/storage_conf.c:502: var_assign: Assigning: unsigned variable "source->nhost" = "virXPathNodeSet". >/builddir/build/BUILD/libvirt-0.10.0/src/conf/storage_conf.c:505: negative_returns: "source->nhost" is passed to a parameter that cannot be negative. >/builddir/build/BUILD/libvirt-0.10.0/src/util/memory.c:128: neg_sink_parm_call: Passing "count" to "calloc", which cannot accept a negative. > >Error: NEGATIVE_RETURNS (CWE-394): >/builddir/build/BUILD/libvirt-0.10.0/src/conf/virdomainlist.c:187: negative_return_fn: Function "virDomainSnapshotObjListNum(snapshots, from, flags)" returns a negative number. >/builddir/build/BUILD/libvirt-0.10.0/src/conf/domain_conf.c:14415: negative_return: Calling "virDomainSnapshotObjListGetNames", which might return a negative value. >/builddir/build/BUILD/libvirt-0.10.0/src/conf/domain_conf.c:14393: negative_return: Calling "virHashSize", which might return a negative value. >/builddir/build/BUILD/libvirt-0.10.0/src/util/virhash.c:419: return_negative_constant: Explicitly returning negative value "-1L". >/builddir/build/BUILD/libvirt-0.10.0/src/conf/domain_conf.c:14393: var_assign: Assigning: "data.count" = "virHashSize(snapshots->objs)", which might be negative. >/builddir/build/BUILD/libvirt-0.10.0/src/conf/domain_conf.c:14407: return_negative_variable: Explicitly returning negative variable "data.count". >/builddir/build/BUILD/libvirt-0.10.0/src/conf/domain_conf.c:14415: return_negative_fn: Returning the return value of "virDomainSnapshotObjListGetNames", which might be negative. >/builddir/build/BUILD/libvirt-0.10.0/src/conf/virdomainlist.c:187: var_assign: Assigning: signed variable "count" = "virDomainSnapshotObjListNum". >/builddir/build/BUILD/libvirt-0.10.0/src/conf/virdomainlist.c:195: negative_returns: "count" is passed to a parameter that cannot be negative. >/builddir/build/BUILD/libvirt-0.10.0/src/util/memory.c:128: neg_sink_parm_call: Passing "count" to "calloc", which cannot accept a negative. > >Error: NO_EFFECT (CWE-398): >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_command.c:3726: array_null: Comparing an array to null is not useful: ""com.redhat.spice.0"". > >Error: NO_EFFECT (CWE-398): >/builddir/build/BUILD/libvirt-0.10.0/src/conf/storage_conf.c:968: array_null: Comparing an array to null is not useful: "src->auth.cephx.secret.uuid != NULL". > >Error: NO_EFFECT (CWE-398): >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_driver.c:9738: array_null: Comparing an array to null is not useful: ""qcow2"". > >Error: NULL_RETURNS (CWE-476): >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_driver.c:9339: example_checked: "pciDeviceListFind(driver->inactivePciHostdevs, pci)" has its value checked in "pciDeviceListFind(driver->inactivePciHostdevs, pci)". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_driver.c:9369: example_assign: Assigning: "other" = return value from "pciDeviceListFind(driver->activePciHostdevs, pci)". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_driver.c:9370: example_checked: "other" has its value checked in "other". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:105: example_checked: "pciDeviceListFind(driver->activePciHostdevs, dev)" has its value checked in "activeDev = pciDeviceListFind(driver->activePciHostdevs, dev)". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:781: example_assign: Assigning: "activeDev" = return value from "pciDeviceListFind(driver->activePciHostdevs, dev)". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:782: example_checked: "activeDev" has its value checked in "activeDev". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:413: example_checked: "pciDeviceListFind(driver->activePciHostdevs, dev)" has its value checked in "other = pciDeviceListFind(driver->activePciHostdevs, dev)". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:485: returned_null: Function "pciDeviceListFind" returns null (checked 12 out of 13 times). >/builddir/build/BUILD/libvirt-0.10.0/src/util/pci.c:1607: return_null: Explicitly returning NULL. >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:485: var_assigned: Assigning: "activeDev" = null return value from "pciDeviceListFind". >/builddir/build/BUILD/libvirt-0.10.0/src/qemu/qemu_hostdev.c:487: dereference: Dereferencing a pointer that might be null "activeDev" when calling "pciDeviceSetUsedBy". >/builddir/build/BUILD/libvirt-0.10.0/src/util/pci.c:1471: deref_parm: Directly dereferencing parameter "dev". > >Error: OVERRUN_STATIC (CWE-119): >/builddir/build/BUILD/libvirt-0.10.0/src/locking/lock_driver_sanlock.c:161: overrun-buffer-arg: Overrunning static array ""__LIBVIRT__DISKS__"" of size 19 bytes by passing it to a function which indexes it with argument "48UL" at byte position 47. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/libvirt-0.10.0/src/conf/domain_conf.c:6563: alloc_arg: Calling allocation function "virXPathNodeSet" on "codecNodes". >/builddir/build/BUILD/libvirt-0.10.0/src/util/xml.c:601: alloc_arg: "virAllocN" allocates memory that is stored into "*list". >/builddir/build/BUILD/libvirt-0.10.0/src/util/memory.c:128: alloc_fn: Storage is returned from allocation function "calloc". >/builddir/build/BUILD/libvirt-0.10.0/src/util/memory.c:128: var_assign: Assigning: "*((void **)ptrptr)" = "calloc(count, size)". >/builddir/build/BUILD/libvirt-0.10.0/src/util/xml.c:605: noescape: Variable "*list" is not freed or pointed-to in function "memcpy". >/builddir/build/BUILD/libvirt-0.10.0/src/conf/domain_conf.c:6579: leaked_storage: Variable "codecNodes" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd.c:147: open_fn: Calling opening function "open". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd.c:147: var_assign: Assigning: "stdinfd" = handle returned from "open("/dev/null", 0)". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd.c:151: noescape: Variable "stdinfd" is not closed or saved in function "dup2". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd.c:168: leaked_handle: Handle variable "stdinfd" going out of scope leaks the handle. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd.c:149: open_fn: Calling opening function "open". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd.c:149: var_assign: Assigning: "stdoutfd" = handle returned from "open("/dev/null", 1)". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd.c:153: noescape: Variable "stdoutfd" is not closed or saved in function "dup2". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd.c:155: noescape: Variable "stdoutfd" is not closed or saved in function "dup2". >/builddir/build/BUILD/libvirt-0.10.0/daemon/libvirtd.c:168: leaked_handle: Handle variable "stdoutfd" going out of scope leaks the handle. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/libvirt-0.10.0/src/storage/storage_backend_disk.c:389: alloc_fn: Calling allocation function "virCommandNewArgList". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:804: alloc_fn: Storage is returned from allocation function "virCommandNew". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:760: alloc_fn: Storage is returned from allocation function "virCommandNewArgs". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:776: alloc_arg: "virAlloc" allocates memory that is stored into "cmd". >/builddir/build/BUILD/libvirt-0.10.0/src/util/memory.c:100: alloc_fn: Storage is returned from allocation function "calloc". >/builddir/build/BUILD/libvirt-0.10.0/src/util/memory.c:100: var_assign: Assigning: "*((void **)ptrptr)" = "calloc(1UL, size)". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:787: noescape: Variable "cmd" is not freed or pointed-to in function "virCommandAddArgSet". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:1279:35: noescape: "virCommandAddArgSet" does not free or save its pointer parameter "cmd". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:789: return_alloc: Returning allocated memory "cmd". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:760: return_alloc_fn: Directly returning storage allocated by "virCommandNewArgs". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:804: var_assign: Assigning: "cmd" = "virCommandNew(binary)". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:809: return_alloc: Returning allocated memory "cmd". >/builddir/build/BUILD/libvirt-0.10.0/src/storage/storage_backend_disk.c:389: var_assign: Assigning: "cmd" = storage returned from "virCommandNewArgList("/sbin/parted", (pool->def->source.devices + 0).path, "mklabel", "--script", ((pool->def->source.format == 1) ? "msdos" : virStoragePoolFormatDiskTypeToString(pool->def->source.format)), NULL)". >/builddir/build/BUILD/libvirt-0.10.0/src/storage/storage_backend_disk.c:397: leaked_storage: Variable "cmd" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/libvirt-0.10.0/src/storage/storage_backend_disk.c:639: alloc_fn: Calling allocation function "virCommandNewArgList". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:804: alloc_fn: Storage is returned from allocation function "virCommandNew". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:760: alloc_fn: Storage is returned from allocation function "virCommandNewArgs". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:776: alloc_arg: "virAlloc" allocates memory that is stored into "cmd". >/builddir/build/BUILD/libvirt-0.10.0/src/util/memory.c:100: alloc_fn: Storage is returned from allocation function "calloc". >/builddir/build/BUILD/libvirt-0.10.0/src/util/memory.c:100: var_assign: Assigning: "*((void **)ptrptr)" = "calloc(1UL, size)". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:787: noescape: Variable "cmd" is not freed or pointed-to in function "virCommandAddArgSet". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:1279:35: noescape: "virCommandAddArgSet" does not free or save its pointer parameter "cmd". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:789: return_alloc: Returning allocated memory "cmd". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:760: return_alloc_fn: Directly returning storage allocated by "virCommandNewArgs". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:804: var_assign: Assigning: "cmd" = "virCommandNew(binary)". >/builddir/build/BUILD/libvirt-0.10.0/src/util/command.c:809: return_alloc: Returning allocated memory "cmd". >/builddir/build/BUILD/libvirt-0.10.0/src/storage/storage_backend_disk.c:639: var_assign: Assigning: "cmd" = storage returned from "virCommandNewArgList("/sbin/parted", (pool->def->source.devices + 0).path, "mkpart", "--script", NULL)". >/builddir/build/BUILD/libvirt-0.10.0/src/storage/storage_backend_disk.c:649: leaked_storage: Variable "cmd" going out of scope leaks the storage it points to. >/builddir/build/BUILD/libvirt-0.10.0/src/storage/storage_backend_disk.c:653: leaked_storage: Variable "cmd" going out of scope leaks the storage it points to. > >Error: RETURN_LOCAL (CWE-562): >/builddir/build/BUILD/libvirt-0.10.0/gnulib/lib/careadlinkat.c:99: local_ptr_assign_local: Assigning: "buffer" = "stack_buf" (address of local variable "stack_buf"). >/builddir/build/BUILD/libvirt-0.10.0/gnulib/lib/careadlinkat.c:103: local_ptr_assign_ptr: Assigning: "buf" = "buffer". >/builddir/build/BUILD/libvirt-0.10.0/gnulib/lib/careadlinkat.c:150: return_local_addr_alias: Returning pointer "buf" which points to local variable "stack_buf". > >Error: REVERSE_INULL (CWE-476): >/builddir/build/BUILD/libvirt-0.10.0/src/esx/esx_vi.c:2052: deref_ptr_in_call: Dereferencing pointer "objectSpec". >/builddir/build/BUILD/libvirt-0.10.0/src/esx/esx_vi_types.generated.c:2065: deref_parm: Directly dereferencing parameter "*ptrptr". >/builddir/build/BUILD/libvirt-0.10.0/src/esx/esx_vi.c:2166: check_after_deref: Dereferencing "objectSpec" before a null check. > >Error: SIZEOF_MISMATCH (CWE-569): >/builddir/build/BUILD/libvirt-0.10.0/tools/virsh-domain.c:4524: suspicious_sizeof: Passing argument "8UL /* sizeof (cpumap) */" to function "_vshCalloc" and then casting the return value to "unsigned char *" is suspicious. > >Error: UNINIT (CWE-457): >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetmessage.c:214: var_decl: Declaring variable "xdr" without initializer. >/builddir/build/BUILD/libvirt-0.10.0/src/rpc/virnetmessage.c:258: uninit_use: Using uninitialized value "xdr.x_ops". > >Error: UNINIT (CWE-457): >/builddir/build/BUILD/libvirt-0.10.0/src/conf/virdomainlist.c:188: var_decl: Declaring variable "list" without initializer. >/builddir/build/BUILD/libvirt-0.10.0/src/conf/virdomainlist.c:215: uninit_use: Using uninitialized value "list". > >Error: UNINIT (CWE-457): >/builddir/build/BUILD/libvirt-0.10.0/tools/virsh-snapshot.c:397: var_decl: Declaring variable "name" without initializer. >/builddir/build/BUILD/libvirt-0.10.0/tools/virsh-snapshot.c:476: uninit_use_in_call: Using uninitialized value "name" when calling "vshError". > >Error: UNUSED_VALUE (CWE-563): >/builddir/build/BUILD/libvirt-0.10.0/tools/virsh-interface.c:885: returned_pointer: Pointer "br_node" returned by "virXPathNode("./bridge", ctxt)" is never used. > >Error: UNUSED_VALUE (CWE-563): >/builddir/build/BUILD/libvirt-0.10.0/tools/virsh-interface.c:890: returned_pointer: Pointer "if_node" returned by "virXPathNode("./bridge/interface[2]", ctxt)" is never used.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 825903
:
587302
| 602408