Explorar o código

registrar: Add check for contact header before checking outbound support

- Fixes crash when processing REGISTER without a contact
Hugh Waite %!s(int64=11) %!d(string=hai) anos
pai
achega
c9301c99d3
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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 */