From 9c5e75835685fa1c015db24d979ba549ace8f753 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sun, 10 Mar 2024 11:30:39 +0100 Subject: [PATCH] Use RawToken() instead of Token() for finding nextEnd. This should improve stability as RawToken() does not verify that start and end elements match. --- xmpp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmpp.go b/xmpp.go index 1f041cb..5e06275 100644 --- a/xmpp.go +++ b/xmpp.go @@ -1461,7 +1461,7 @@ func nextStart(p *xml.Decoder) (xml.StartElement, error) { func nextEnd(p *xml.Decoder) (xml.EndElement, error) { p.Strict = false for { - t, err := p.Token() + t, err := p.RawToken() if err != nil || t == nil { return xml.EndElement{}, err }