diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2017-11-08 00:14:13 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-11-08 00:14:13 -0600 |
commit | 1f09784d28c3856ddb3905dbd1b54a603f8508f7 (patch) | |
tree | 20279952d645dd6b9acc78faf128df4166f28be2 | |
parent | 446b3ea862ef0fa450043cde064e4db76fa42c3d (diff) | |
parent | 4c4772472ebd8ba98dfddfb235da1c44445cd8e1 (diff) |
Merge "res_pjsip: Avoid crash when contact uri is empty string" into 15
-rw-r--r-- | res/res_pjsip/location.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c index 9945c7c10..0d7b3da31 100644 --- a/res/res_pjsip/location.c +++ b/res/res_pjsip/location.c @@ -1219,6 +1219,11 @@ static int contact_apply_handler(const struct ast_sorcery *sorcery, void *object struct ast_sip_contact_status *status; struct ast_sip_contact *contact = object; + if (ast_strlen_zero(contact->uri)) { + ast_log(LOG_ERROR, "A URI on dynamic contact '%s' is empty\n", + ast_sorcery_object_get_id(contact)); + return -1; + } status = ast_res_pjsip_find_or_create_contact_status(contact); ao2_cleanup(status); |