Skip to content

Commit

Permalink
pua: safety check for params values
Browse files Browse the repository at this point in the history
(cherry picked from commit a009a5b)
(cherry picked from commit 7b4a653)
  • Loading branch information
miconda committed Dec 18, 2017
1 parent 4066b1d commit 728848f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/pua/send_subscribe.c
Expand Up @@ -803,7 +803,7 @@ ua_pres_t* subscribe_cbparam(subs_info_t* subs, int ua_flag)
hentity->contact.len= subs->contact->len;
size+= subs->contact->len;

if(subs->outbound_proxy)
if(subs->outbound_proxy && subs->outbound_proxy->s)
{
hentity->outbound_proxy= (str*)((char*)hentity+ size);
size+= sizeof(str);
Expand All @@ -821,7 +821,7 @@ ua_pres_t* subscribe_cbparam(subs_info_t* subs, int ua_flag)
{
CONT_COPY(hentity, hentity->id, subs->id)
}
if(subs->extra_headers)
if(subs->extra_headers && hentity->extra_headers->s)
{
hentity->extra_headers= (str*)((char*)hentity+ size);
size+= sizeof(str);
Expand Down

0 comments on commit 728848f

Please sign in to comment.