Hi,

Please find the latest report on new defect(s) introduced to libvirt found with Coverity Scan.

Defect Details

** 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);

  

View Defects in Coverity Scan

Best regards,

The Coverity Scan Admin Team