浏览代码

registrar: Add check for contact header before checking outbound support

- Fixes crash when processing REGISTER without a contact
Hugh Waite 11 年之前
父节点
当前提交
c9301c99d3
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      modules/registrar/save.c

+ 1 - 0
modules/registrar/save.c

@@ -910,6 +910,7 @@ int save(struct sip_msg* _m, udomain_t* _d, int _cflags, str *_uri)
 	}
 
 	if (reg_outbound_mode != REG_OUTBOUND_NONE
+			&& _m->contact && _m->contact->parsed
 			&& !(parse_headers(_m, HDR_VIA2_F, 0) == -1 || _m->via2 == 0
 				|| _m->via2->error != PARSE_OK)) {
 		/* Outbound supported on server, and more than one Via: - not the first hop */