[sr-dev] git:master: ims_registrar_pcscf: Make sure, Contact-Info-Structure is properly initialized.

Carsten Bock carsten at ng-voice.com
Tue Mar 4 11:51:23 CET 2014


Module: sip-router
Branch: master
Commit: 2cfe0862faafa736b342f15d640581acdf15808c
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2cfe0862faafa736b342f15d640581acdf15808c

Author: Carsten Bock <carsten at ng-voice.com>
Committer: Carsten Bock <carsten at ng-voice.com>
Date:   Tue Mar  4 11:50:19 2014 +0100

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

---

 modules/ims_registrar_pcscf/save.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/ims_registrar_pcscf/save.c b/modules/ims_registrar_pcscf/save.c
index e9bcd7d..2843278 100644
--- a/modules/ims_registrar_pcscf/save.c
+++ b/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) {




More information about the sr-dev mailing list