mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-08 06:12:45 +00:00
Merge "res_pjsip: Avoid crash when contact uri is empty string" into 13
This commit is contained in:
@@ -1226,6 +1226,11 @@ static int contact_apply_handler(const struct ast_sorcery *sorcery, void *object
|
|||||||
struct ast_sip_contact_status *status;
|
struct ast_sip_contact_status *status;
|
||||||
struct ast_sip_contact *contact = object;
|
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);
|
status = ast_res_pjsip_find_or_create_contact_status(contact);
|
||||||
ao2_cleanup(status);
|
ao2_cleanup(status);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user