Przeglądaj źródła

pua: safety checks for str pointers

Daniel-Constantin Mierla 10 lat temu
rodzic
commit
80977adc1b
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      modules/pua/send_subscribe.c

+ 2 - 2
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);