diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2022-10-31 15:13:04 +0100 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2022-11-02 19:46:19 +0100 |
commit | 4d3f5ac0cc731a1120154f707bceb57eb4ddabe2 (patch) | |
tree | 273b3eec233b9a0514f93fe2a351b08cd8aa9527 /src/network/kernel | |
parent | 899e540d46adb72f212091ffb5fd3bf2262a556c (diff) |
QHostAddress: Fix incorrect comparison against 'Any'
When 'this' is IPv6 and 'other' is Any then there is no point in testing
'other's IPv6 address.
Added extra tests against QHostAddress::Any*.
Pick-to: 6.4 6.2 5.15
Fixes: QTBUG-108103
Change-Id: I09f32b1b147b1ec8380546c91cd89684a6bebe2e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/kernel')
-rw-r--r-- | src/network/kernel/qhostaddress.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp index 2f673d8c6d..827b622ac0 100644 --- a/src/network/kernel/qhostaddress.cpp +++ b/src/network/kernel/qhostaddress.cpp @@ -818,7 +818,7 @@ bool QHostAddress::isEqual(const QHostAddress &other, ConversionMode mode) const return memcmp(&d->a6, &other.d->a6, sizeof(Q_IPV6ADDR)) == 0; case QHostAddress::AnyIPProtocol: return (mode & QHostAddress::ConvertUnspecifiedAddress) - && (other.d->a6_64.c[0] == 0) && (other.d->a6_64.c[1] == 0); + && (d->a6_64.c[0] == 0) && (d->a6_64.c[1] == 0); case QHostAddress::UnknownNetworkLayerProtocol: return false; } |