annotate libpurple/protocols/jabber/google/google_presence.h @ 32797:aacfb71133cc

Fix a possible MSN remote crash Incoming messages with certain characters or character encodings can cause clients to crash. The fix is for the contents of all incoming plaintext messages are converted to UTF-8 and validated before used. This was reported to us by Fabian Yamaguchi and this patch was written by Elliott Sales de Andrade (maybe with small, insignificant changes by me)
author Mark Doliner <mark@kingant.net>
date Mon, 07 May 2012 03:18:08 +0000
parents 34f586bffe4e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30473
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
1 /**
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
2 * Purple is the legal property of its developers, whose names are too numerous
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
3 * to list here. Please refer to the COPYRIGHT file distributed with this
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
4 * source distribution.
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
5 *
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
9 * (at your option) any later version.
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
10 *
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
14 * GNU General Public License for more details.
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
15 *
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
19 */
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
20
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
21 #ifndef PURPLE_JABBER_GOOGLE_PRESENCE_H_
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
22 #define PURPLE_JABBER_GOOGLE_PRESENCE_H_
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
23
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
24 #include "jabber.h"
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
25 #include "buddy.h"
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
26 #include "status.h"
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
27
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
28 void jabber_google_presence_incoming(JabberStream *js, const char *who, JabberBuddyResource *jbr);
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
29 char *jabber_google_presence_outgoing(PurpleStatus *tune);
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
30
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
31
34f586bffe4e Added new files in sub directory google
Marcus Lundblad <ml@update.uu.se>
parents:
diff changeset
32 #endif /* PURPLE_JABBER_GOOGLE_PRESENCE_H_ */