Hi,
Please find the latest report on new defect(s) introduced to libvirt found with Coverity
Scan.
2 new defect(s) introduced to libvirt found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 454010: Null pointer dereferences (REVERSE_INULL)
/src/security/security_dac.c: 839 in virSecurityDACRestoreFileLabelInternal()
________________________________________________________________________________________________________
*** CID 454010: Null pointer dereferences (REVERSE_INULL)
/src/security/security_dac.c: 839 in virSecurityDACRestoreFileLabelInternal()
833
834 if ((rv = virSecurityDACTransactionAppend(path, src, uid, gid, recall, true))
< 0)
835 return -1;
836 else if (rv > 0)
837 return 0;
838
>> CID 454010: Null pointer dereferences (REVERSE_INULL)
>> Null-checking "path" suggests that it may be null, but it has
already been dereferenced on all paths leading to the check.
839 if (recall
&& path) {
840 rv = virSecurityDACRecallLabel(priv, path, &uid, &gid);
841 if (rv == -2) {
842 /* Not supported. Don't error though. */
843 } else if (rv < 0) {
844 return -1;
** CID 454009: Null pointer dereferences (FORWARD_NULL)
/src/security/security_dac.c: 828 in virSecurityDACRestoreFileLabelInternal()
________________________________________________________________________________________________________
*** CID 454009: Null pointer dereferences (FORWARD_NULL)
/src/security/security_dac.c: 828 in virSecurityDACRestoreFileLabelInternal()
822 gid_t gid = 0;
823
824 if (!path && src && src->path &&
825 virStorageSourceIsLocalStorage(src))
826 path = src->path;
827
>> CID 454009: Null pointer dereferences (FORWARD_NULL)
>> Passing null pointer "path" to "virFileExists", which
dereferences it. (The dereference is assumed on the basis of the "nonnull"
parameter attribute.)
828 if (!virFileExists(path))
829 return 0;
830
831 /* Be aware that this function might run in a separate process.
832 * Therefore, any driver state changes would be thrown away. */
833
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy...