[kopete-bugs] [Bug 179425] Kopete crashes when I get a message with MSN from an emesene client

Sergio Padrino sergio.padrino at gmail.com
Wed Feb 25 15:54:08 CET 2009


https://bugs.kde.org/show_bug.cgi?id=179425





--- Comment #23 from Sergio Padrino <sergio padrino gmail com>  2009-02-25 15:54:05 ---
I finally found the bug. It's emesene related... they send this in
Conversation.py:

        return "X-MMS-IM-Format: FN=" + face + \
            "; EF=" + effectValue + "; CO=" + color + \
            "; PF=0;RL=" + self.getRTL(message)

Where PF=0; and RL are not separated by a space, so libmsn throws an exception
here:

    std::map<std::string, std::string> Message::getFormatInfo() const throw
(std::runtime_error)
    {
        std::map<std::string, std::string> formatInfo;
        std::string formatHeader = (*this)["X-MMS-IM-Format"];
        if (formatHeader.empty())
            return formatInfo;

        std::vector<std::string> parameters = splitString(formatHeader, "; ");
        std::vector<std::string>::const_iterator i = parameters.begin();
        for (; i != parameters.end(); i++)
        {
            std::vector<std::string> pair = splitString(*i, "=");
            if (pair.size() == 2)
                formatInfo[decodeURL(pair[0])] = decodeURL(pair[1]);
            else if (pair.size() == 1)
                formatInfo[decodeURL(pair[0])] = "";
            else
                throw std::runtime_error("Incorrectly specified message
format!");
        }

        return formatInfo;
    }

because it cannot parse it right with splitString (it uses "; " as separator).

emesene developers have been informed, but if someone want to change
Conversation.py by adding that space after PF=0;

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the kopete-bugs mailing list