Module: kamailio
Branch: master
Commit: 80977adc1bd70479c1e32d867563e4e684060b25
URL:
https://github.com/kamailio/kamailio/commit/80977adc1bd70479c1e32d867563e4e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-05-14T10:04:26+02:00
pua: safety checks for str pointers
---
Modified: modules/pua/send_subscribe.c
---
Diff:
https://github.com/kamailio/kamailio/commit/80977adc1bd70479c1e32d867563e4e…
Patch:
https://github.com/kamailio/kamailio/commit/80977adc1bd70479c1e32d867563e4e…
---
diff --git a/modules/pua/send_subscribe.c b/modules/pua/send_subscribe.c
index 48acbd5..84b69f8 100644
--- a/modules/pua/send_subscribe.c
+++ b/modules/pua/send_subscribe.c
@@ -887,7 +887,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);
@@ -907,7 +907,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);