From 30d24c8df600545d1878a868bcd409e65479af77 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 4 Jul 2022 11:23:33 +0900 Subject: [PATCH] resolve: mdns_packet_extract_matching_rrs() may return 0 Fixes the following assertion: --- Assertion 'r > 0' failed at src/resolve/resolved-mdns.c:180, function mdns_do_tiebreak(). Aborting. --- (cherry picked from commit f2605af1f2e770818bbc6bad2561acdbd25a38ad) (cherry picked from commit 0070302b3cdc1350bf7bfd5d032dbea420f4ed40) --- src/resolve/resolved-mdns.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/resolve/resolved-mdns.c b/src/resolve/resolved-mdns.c index 24241249b1..8c8ee81da1 100644 --- a/src/resolve/resolved-mdns.c +++ b/src/resolve/resolved-mdns.c @@ -165,8 +165,6 @@ static int mdns_do_tiebreak(DnsResourceKey *key, DnsAnswer *answer, DnsPacket *p if (r < 0) return r; - assert(r > 0); - if (proposed_rrs_cmp(remote, r, our, size) > 0) return 1;