pidgin: f0591ed5: sametime: Avoid a theoretical null strcm...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Thu Jul 21 01:45:54 EDT 2011


----------------------------------------------------------------------
Revision: f0591ed5820261562bb9d8f49c75d08e3b334bfa
Parent:   86b81140cf9a026a5120ddaee8e918c06d347d90
Author:   darkrain42 at pidgin.im
Date:     07/20/11 23:26:18
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f0591ed5820261562bb9d8f49c75d08e3b334bfa

Changelog: 

sametime: Avoid a theoretical null strcmp

We don't ever call group_ensure() with a non-null group, and
libmeanwhile takes steps to ensure a group never has a NULL name,
so this can't happen.  But this makes clang happier.

Changes against parent 86b81140cf9a026a5120ddaee8e918c06d347d90

  patched  libpurple/protocols/sametime/sametime.c

-------------- next part --------------
============================================================
--- libpurple/protocols/sametime/sametime.c	8bddb7b05001ed174c77a8f499c5a063c46ac9d4
+++ libpurple/protocols/sametime/sametime.c	107dead2a266caa66bb03cd961bbdfe510945d1b
@@ -922,6 +922,11 @@ static PurpleGroup *group_ensure(PurpleC
   alias = mwSametimeGroup_getAlias(stgroup);
   type = mwSametimeGroup_getType(stgroup);
 
+  if (!name) {
+    DEBUG_WARN("Can't ensure a null group\n");
+    return
+  }
+
   DEBUG_INFO("attempting to ensure group %s, called %s\n",
 	     NSTR(name), NSTR(alias));
 


More information about the Commits mailing list