[sr-dev] git:5.1:7b4a653a: pua: safety check for params values

Daniel-Constantin Mierla miconda at gmail.com
Fri Dec 8 16:56:20 CET 2017


Module: kamailio
Branch: 5.1
Commit: 7b4a653abef51afe6a6289048ed989ba969c1310
URL: https://github.com/kamailio/kamailio/commit/7b4a653abef51afe6a6289048ed989ba969c1310

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-12-08T16:55:22+01:00

pua: safety check for params values

(cherry picked from commit a009a5bf4f145b4e877e5ba41d218607c30849ec)

---

Modified: src/modules/pua/send_subscribe.c

---

Diff:  https://github.com/kamailio/kamailio/commit/7b4a653abef51afe6a6289048ed989ba969c1310.diff
Patch: https://github.com/kamailio/kamailio/commit/7b4a653abef51afe6a6289048ed989ba969c1310.patch

---

diff --git a/src/modules/pua/send_subscribe.c b/src/modules/pua/send_subscribe.c
index 89b597a77a..b75290b936 100644
--- a/src/modules/pua/send_subscribe.c
+++ b/src/modules/pua/send_subscribe.c
@@ -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);
@@ -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);




More information about the sr-dev mailing list