From 7ae49d5972e5a573bb88cbe597198dc4beb689f9 Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:00:24 +0100 Subject: [PATCH] FIX: Don't loop forever if an RR CLASS doesn't match the apex CLASS. --- src/sign/records.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/sign/records.rs b/src/sign/records.rs index ead4fd0fb..616e03ed6 100644 --- a/src/sign/records.rs +++ b/src/sign/records.rs @@ -492,11 +492,10 @@ impl<'a, N, D> RecordsIter<'a, N, D> { where N: ToName, { - while let Some(first) = self.slice.first() { - if first.class() != apex.class() { - continue; - } - if apex == first || first.owner().ends_with(apex.owner()) { + for rr in self.slice { + if rr.class() == apex.class() + && (apex == rr || rr.owner().ends_with(apex.owner())) + { break; } self.slice = &self.slice[1..]