Skip to content
Snippets Groups Projects
Commit fdba5fce authored by Jenkins2's avatar Jenkins2 Committed by Gerrit Code Review
Browse files

Merge "res_pjsip: Avoid crash when contact uri is empty string"

parents 06746b0a a36d8cc5
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment