[Pidgin] #8830: Pidgin 2.5.5 crash with jabber

Pidgin trac at pidgin.im
Wed Apr 1 19:13:31 EDT 2009


#8830: Pidgin 2.5.5 crash with jabber
------------------------------------+---------------------------------------
 Reporter:  Nico                    |        Owner:  deryni
     Type:  patch                   |       Status:  new   
Milestone:  Patches Needing Review  |    Component:  XMPP  
  Version:  2.5.5                   |   Resolution:        
 Keywords:  jabber                  |  
------------------------------------+---------------------------------------

Comment(by TEMHOTA):

 Replying to [comment:7 darkrain42]:
 > Replying to [comment:6 TEMHOTA]:
 > > After all - apply attached patches to pidgin and libxml - this fix
 crash in libxml.
 >
 > The patches for xmlnode.c are not likely to help here. Jabber uses its
 own SAX parser, not the one in xmlnode.c (and it apparently already
 provides an serror handler).

 It REALLY help. With/witout this part - libxml still generate warning
 about 'URI vcard-temp' and ingect it to it's own crappy calback
 trampoline.

 > That patch for libxml2 does look like that might fix the real problem,
 though
 It ONLY allow calling our error handler and nothing more.

 Replying to [comment:8 deryni]:
 > Assuming we attempt to parse a manual closing of the stream do we need
 the second call to xmlParseChunk for NULL? Does that not look like an
 error given that we have told libxml2 that the previous </stream> chunk
 was the last chunk?

 Hmm. You suggest fix all jabber-server in the world ? Or break it ? libxml
 want complete finished stream when xmlFreeParserCtxt() is called. So
 adding close tag - make it happy.

 > That aside, I don't think doing that there is likely correct anyway. I
 think it more likely to want to be done in jabber_stream_init
 > {{{
 > if (js->reinit) {
 >     xmlParseChunk(js->context, "</stream:stream">, 0, 0);
 > }
 > }}}
 which call jabber_sertam_init() which call jabber_parser_setup() which
 call jabber_parser_free().

 > or (more likely) with a function in parser.c which does that.
 jabber_parser_free() finishing stream and nothing more. Stream always not
 closed. first time - it's not closed after success auth, second time -
 after disconnect.

 > A side question is: Why would we want to install a structured error
 handler in the xmlnode.c parser? (Especially one that copies the XMPP-
 specific vcard-temp warning supression. =) )
 My bad, copy&paste handler :) and xmlnode report same error:

 {{{
 (03:05:46) jabber: Recv (1448): <iq xmlns='jabber:client'
 id='purplea61e42d4' type='result'><vCard xmlns='vcard-
 temp'><PHOTO><TYPE>image/png</TYPE><BINVAL>......</BINVAL></PHOTO><EMAIL><USERID>user at jabber</USERID></EMAIL></vCard></iq>
 (03:05:46) xmlnode: XML parser error for xmlnode 0x8bcbbb4: Domain 3, code
 100, level 1: xmlns: URI vcard-temp is not absolute
 }}}


 > This crash appears to be different than the one I had seen a while back
 (#8136) which is curious.
 Maybe, but if this is crash in libxml - any of libxml function must be in
 backtrace.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/8830#comment:9>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list