New Defects reported by Coverity Scan for libvirt
by scan-admin@coverity.com
Hi,
Please find the latest report on new defect(s) introduced to libvirt found with Coverity Scan.
1 new defect(s) introduced to libvirt found with Coverity Scan.
8 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 483555: Integer handling issues (INTEGER_OVERFLOW)
/src/conf/numa_conf.c: 999 in virDomainNumaDefFormatXML()
_____________________________________________________________________________________________
*** CID 483555: Integer handling issues (INTEGER_OVERFLOW)
/src/conf/numa_conf.c: 999 in virDomainNumaDefFormatXML()
993
994 virBufferAddLit(buf, "<numa>\n");
995 virBufferAdjustIndent(buf, 2);
996 for (i = 0; i < ncells; i++) {
997 virBitmap *cpumask = virDomainNumaGetNodeCpumask(def, i);
998 g_auto(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
>>> CID 483555: Integer handling issues (INTEGER_OVERFLOW)
>>> Expression "buf->indent + 2", where "buf->indent" is known to be equal to 2147483647, overflows the type of "buf->indent + 2", which is type "int".
999 g_auto(virBuffer) childBuf = VIR_BUFFER_INIT_CHILD(buf);
1000
1001 memAccess = virDomainNumaGetNodeMemoryAccessMode(def, i);
1002 discard = virDomainNumaGetNodeDiscard(def, i);
1003
1004 virBufferAsprintf(&attrBuf, " id='%zu'", i);
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/libvirt?tab=overview