Przeglądaj źródła

ims_registrar_pcscf: Make sure, Contact-Info-Structure is properly initialized.

Carsten Bock 11 lat temu
rodzic
commit
2cfe0862fa
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      modules/ims_registrar_pcscf/save.c

+ 4 - 0
modules/ims_registrar_pcscf/save.c

@@ -131,6 +131,10 @@ static inline int update_contacts(struct sip_msg *req,struct sip_msg *rpl, udoma
 		 * then, we will update on NOTIFY */
 		return 0;
 	}
+
+	// Set the structure to "0", to make sure it's properly initialized
+	memset(&ci, 0, sizeof(struct pcontact_info));
+
 	for (h = rpl->contact; h; h = h->next) {
 		if (h->type == HDR_CONTACT_T && h->parsed)
 			for (c = ((contact_body_t*) h->parsed)->contacts; c; c = c->next) {