Henning Nor=E9n spake unto us the following wisdom:
> What is happening is that when the authentication has been made we
> reinitializes the stream by calling jabber_stream_init and that clears
> the xml context. This causes a problem as we are inside the
> xmlParseChunk (actually xmlParseTryOrFinish) when this is happening and
> that code is not finished working with the context, and thus we will
> work with memory that is no longer allocated (confirmed by valgrind).
> My workaround is to delay the actual reinitialization to after we have
> finished the current jabber_parser_process-call by introducing a flag
> (reinit) that tells when this operation may be done from
Thanks! I don't know if this fix is completely correct, either, but I
committed it with a minor change and it at least gets me signed on.
;-) At the very least, we appreciate you having tracked down the root
of the problem, and even if this fix proves to be stopgap, it's
superior to what was there before.
The laws that forbid the carrying of arms are laws [that have no remedy
for evils]. They disarm only those who are neither inclined nor
determined to commit crimes.
-- Cesare Beccaria, "On Crimes and Punishments", 1764