NetworkManager/src/core/dns
Jan Vaclav 8685ac1845 dns: fix infinite loop in assertion checking search domains
The loop condition checked the same pointer twice instead of checking
the array element: `ip_data->domains.search && ip_data->domains.search`
should be `ip_data->domains.search && ip_data->domains.search[i]`.

As written, the loop would never terminate when `search` is non-NULL
(only in debug builds with NM_MORE_ASSERTS > 5).

Found by Coverity (CID: CONSTANT_EXPRESSION_RESULT).

Fixes: b8dab47705 ('dns: fix handling default routing domains with systemd-resolved')
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 12:54:12 +02:00
..
nm-dns-dnsconfd.c dns: return error from nm_dns_uri_parse() 2025-08-14 09:40:26 +02:00
nm-dns-dnsconfd.h dns: Add dnsconfd DNS plugin 2025-01-29 14:41:47 +01:00
nm-dns-dnsmasq.c core: nm-dns-dnsmasq: listen on ipv6 localhost too 2025-10-22 15:42:57 +02:00
nm-dns-dnsmasq.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dns-manager.c dns: fix infinite loop in assertion checking search domains 2026-04-14 12:54:12 +02:00
nm-dns-manager.h emit DNS CONFIG_CHANGED signal even dns=none 2023-09-26 15:00:32 +08:00
nm-dns-plugin.c dns: add "update-pending" state to NMDnsPlugin 2022-04-15 09:04:29 +02:00
nm-dns-plugin.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dns-systemd-resolved.c core: add support for connection.dnssec 2025-10-13 11:57:53 +02:00
nm-dns-systemd-resolved.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00