瀏覽代碼

pua: proper safety check on subs->extra_headers->s for subscribe_cbparam()

- dicovered via GH PR #1409

(cherry picked from commit cda1d086c164052a5b79b54a8d0e5cf6e5fb3e1c)
Daniel-Constantin Mierla 7 年之前
父節點
當前提交
dda84fd78c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/modules/pua/send_subscribe.c

+ 1 - 1
src/modules/pua/send_subscribe.c

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