# HG changeset patch # User Matthew Wild # Date 1256130333 -3600 # Node ID a919511c45ac662d26e834e9d45915e628511636 # Parent 0f9c121713e1ac7cd330f1074ee6d05393edcefd xmlhandlers: Reset state on error or stream close, fixes possible traceback diff -r 0f9c121713e1 -r a919511c45ac core/xmlhandlers.lua --- a/core/xmlhandlers.lua Wed Oct 21 13:59:54 2009 +0100 +++ b/core/xmlhandlers.lua Wed Oct 21 14:05:33 2009 +0100 @@ -114,12 +114,13 @@ if cb_streamclosed then cb_streamclosed(session); end - return; elseif name == "error" then cb_error(session, "stream-error", stanza); else cb_error(session, "parse-error", "unexpected-element-close", name); end + stanza, chardata = nil, {}; + return; end if #chardata > 0 then -- We have some character data in the buffer