]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Prevent potentially passing a NULL pointer to strcasecmp()
authorMark Michelson <mmichelson@digium.com>
Wed, 21 Mar 2012 15:44:55 +0000 (15:44 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 21 Mar 2012 15:44:55 +0000 (15:44 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8-digiumphones@360188 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index 913508965d91115401f9d429033b2a07406436fe..9e3f5325be02328de1363c43317c7d70d4383430 100644 (file)
@@ -4574,6 +4574,10 @@ static int handle_presencechange(void *datap)
                }
                ast_str_set(&hint_app, 0, "%s", app);
                parse = parse_hint_presence(hint_app);
+               if (ast_strlen_zero(parse)) {
+                       ao2_unlock(hint);
+                       continue;
+               }
                if (strcasecmp(parse, pc->provider)) {
                        /* The hint does not monitor the presence provider. */
                        ao2_unlock(hint);