pidgin: 0a8ec53a: Fix CID 399 - I'm reasonably sure this c...
datallah at pidgin.im
datallah at pidgin.im
Tue Dec 9 21:50:23 EST 2008
-----------------------------------------------------------------
Revision: 0a8ec53a6de6bb97a7e43abb0364227be7d15b14
Ancestor: 09d396a2cb091531ea1165fa5189ed61f3f63033
Author: datallah at pidgin.im
Date: 2008-12-10T02:28:30
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0a8ec53a6de6bb97a7e43abb0364227be7d15b14
Modified files:
libpurple/protocols/bonjour/jabber.c
ChangeLog:
Fix CID 399 - I'm reasonably sure this couldn't ever actually cause a NULL deref.
-------------- next part --------------
============================================================
--- libpurple/protocols/bonjour/jabber.c 8f7390bdb185578c57a33a612e4dd23ef8d54c4e
+++ libpurple/protocols/bonjour/jabber.c 7ae523d26e4c3cdb1a3f09fcc5679d34d6073899
@@ -128,7 +128,7 @@ get_xmlnode_contents(xmlnode *node)
if (contents) {
char *bodystart = strchr(contents, '>');
- char *bodyend = strrchr(bodystart, '<');
+ char *bodyend = bodystart ? strrchr(bodystart, '<') : NULL;
if (bodystart && bodyend && (bodystart + 1) != bodyend) {
*bodyend = '\0';
memmove(contents, bodystart + 1, (bodyend - bodystart));
More information about the Commits
mailing list