[Psi-devel] Crasher in iris/xmpp-im/xmpp_vcard.cpp - image2type()

Iain MacDonnell dseven-psi at dseven.org
Mon May 15 12:39:00 PDT 2006


Just encountered a nasty little crasher bug in Psi 0.10 - for some
reason, a couple of my users are now being presented with a VCard that
has either a photo or a logo in it, but QImageIO::imageFormat() doesn't
recognise the type, and so it returns 0 in image2type() in
iris/xmpp-im/xmpp_vcard.cpp. This results in a seg-fault when it's sent
to qWarning():

core file = core -- program ``/opt/psi/bin/psi'' on platform 
SUNW,Sun-Fire-V440
SIGSEGV: Segmentation Fault
$c
libc.so.1`strlen+0x50(4806a7, ffbfdbb4, ffbfb3b1, 0, 0, 0)
libc.so.1`vsnprintf+0x6c(ffbfbb64, 2004, 480677, ffbfdbb0, 7ffffc00, 23a1a0)
libqt-mt.so.3.3.5`__1cIqWarning6FpkcE_v_+0x54(480677, ff01a1ec, 703f18, 
703f18, 0, 34c00)
__1cKimage2type6FrknJQdDMemArray4Cc___nHQdDString__+0x38c(ffbfe3bc, 
7c6050, 4df094, 4df000, ffbfdbcc, 480604)
__1cEXMPPFVCardFtoXml6kMpnMQdDDomDocument__nLQdDDomElement__+0x7f4(ffbfe520, 
7ca768, ffbfe530, 7c6030, 7c6030,
ffbfe3d8)
...etc...


My quick-fix was:

-       qWarning("WARNING! VCard::image2type: unknown format = '%s'", 
format.latin1());
+       qWarning("WARNING! VCard::image2type: unknown format = '%s'", 
(format==0?"UNKNOWN":format.latin1()));


In Psi 0.11, way the warning message is constructed looks a bit
different, but I'm not sure it wouldn't still crash in these
circumstances...

     ~Iain





More information about the psi-devel mailing list