Module: kamailio Branch: 4.2 Commit: a89778423e4886ac48857253d9567d17040e3b45 URL: https://github.com/kamailio/kamailio/commit/a89778423e4886ac48857253d9567d17...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2015-05-19T09:28:55+02:00
pua: safety checks for str pointers
(cherry picked from commit 80977adc1bd70479c1e32d867563e4e684060b25)
---
Modified: modules/pua/send_subscribe.c
---
Diff: https://github.com/kamailio/kamailio/commit/a89778423e4886ac48857253d9567d17... Patch: https://github.com/kamailio/kamailio/commit/a89778423e4886ac48857253d9567d17...
---
diff --git a/modules/pua/send_subscribe.c b/modules/pua/send_subscribe.c index 17a4f3f..5f4b0b8 100644 --- a/modules/pua/send_subscribe.c +++ b/modules/pua/send_subscribe.c @@ -888,7 +888,7 @@ ua_pres_t* subs_cbparam_indlg(ua_pres_t* subs, int expires, int ua_flag)
CONT_COPY(hentity, hentity->contact, subs->contact)
- if(subs->outbound_proxy) + if(subs->outbound_proxy && subs->outbound_proxy->len && subs->outbound_proxy->s) { hentity->outbound_proxy= (str*)((char*)hentity+ size); size+= sizeof(str); @@ -908,7 +908,7 @@ ua_pres_t* subs_cbparam_indlg(ua_pres_t* subs, int expires, int ua_flag) CONT_COPY(hentity, hentity->remote_contact, subs->remote_contact) }
- if(subs->extra_headers) + if(subs->extra_headers && subs->extra_headers->s) { hentity->extra_headers= (str*)((char*)hentity+ size); size+= sizeof(str);