From 8e0d2ee982a2b872a400415555c3fa2b35352060 Mon Sep 17 00:00:00 2001 From: Raymond Chandler Date: Wed, 15 Jan 2014 10:56:15 -0500 Subject: [PATCH] FS-6090 --resolve --- src/mod/applications/mod_lcr/mod_lcr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mod/applications/mod_lcr/mod_lcr.c b/src/mod/applications/mod_lcr/mod_lcr.c index 7755eadb5a..c5e6e26841 100644 --- a/src/mod/applications/mod_lcr/mod_lcr.c +++ b/src/mod/applications/mod_lcr/mod_lcr.c @@ -191,9 +191,13 @@ static const char *do_cid(switch_memory_pool_t *pool, const char *cid, const cha src++; /* break on first / */ - dst = strchr(src, '/'); - *dst = '\0'; - dst++; + if((dst = strchr(src, '/'))) { + *dst = '\0'; + dst++; + } else { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid destination part in regexp: %s\n", src); + goto done; + } switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "src: %s, dst: %s\n", src, dst); } else { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Not a valid regexp: %s\n", src);