migrate: detect xml incompatibility

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

* src/conf/domain_conf.c (virDomainChannelDefCheckABIStability):
Use correct sizeof operand.
This commit is contained in:
Eric Blake 2011-06-02 17:40:39 -06:00
parent 278a050a52
commit d391661ae4
1 changed files with 2 additions and 1 deletions

View File

@ -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,