[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 11/10] migrate: detect xml incompatibility



Detected by Coverity.  Bug introduced in 08106e2044 (unreleased).

* src/conf/domain_conf.c (virDomainChannelDefCheckABIStability):
Use correct sizeof operand.
---
 src/conf/domain_conf.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9975bca..0d9fef4 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7269,7 +7269,8 @@ static bool virDomainChannelDefCheckABIStability(virDomainChrDefPtr src,
         }
         break;
     case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD:
-        if (memcmp(src->target.addr, dst->target.addr, sizeof(src->target.addr)) != 0) {
+        if (memcmp(src->target.addr, dst->target.addr,
+                   sizeof(*src->target.addr)) != 0) {
             char *saddr = virSocketFormatAddrFull(src->target.addr, true, ":");
             char *daddr = virSocketFormatAddrFull(dst->target.addr, true, ":");
             virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-- 
1.7.4.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]