]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: use correct sizeof when allocating cpumap
authorJán Tomko <jtomko@redhat.com>
Thu, 29 Nov 2012 10:23:06 +0000 (11:23 +0100)
committerEric Blake <eblake@redhat.com>
Thu, 29 Nov 2012 17:10:08 +0000 (10:10 -0700)
commitdc04b2a737c8c4240d0d412080ce798b977068a1
treed38fb5565965a0810ff8830acbf6715583d301f2
parent7730257db30972a6f4db8d582b232b240b2a06b8
virsh: use correct sizeof when allocating cpumap

Found by coverity:
Error: SIZEOF_MISMATCH (CWE-569):
    libvirt-0.10.2/tools/virsh-domain.c:4754: suspicious_sizeof: Passing
    argument "8UL /* sizeof (cpumap) */" to function
    "_vshCalloc(vshControl *, size_t, size_t, char const *, int)" and
    then casting the return value to "unsigned char *" is suspicious.

Error: SIZEOF_MISMATCH (CWE-569):
    libvirt-0.10.2/tools/virsh-domain.c:4942: suspicious_sizeof: Passing
    argument "8UL /* sizeof (cpumap) */" to function
    "_vshCalloc(vshControl *, size_t, size_t, char const *, int)" and
    then casting the return value to "unsigned char *" is suspicious.
tools/virsh-domain.c