From 75ff6925420a6847373fccd9faa9bfd3147d288e Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Wed, 21 Mar 2012 15:44:55 +0000 Subject: [PATCH] Prevent potentially passing a NULL pointer to strcasecmp() git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8-digiumphones@360188 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/pbx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/pbx.c b/main/pbx.c index 913508965d..9e3f5325be 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -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); -- 2.47.2