[sr-dev] git:master: topoh: safety check for Via header when removed from script

Daniel-Constantin Mierla miconda at gmail.com
Wed May 29 10:50:38 CEST 2013


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Wed May 29 10:49:40 2013 +0200

topoh: safety check for Via header when removed from script

- reported by Guillaume Bour, FS#300

---

 modules/topoh/th_msg.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/topoh/th_msg.c b/modules/topoh/th_msg.c
index df29ea1..4d25750 100644
--- a/modules/topoh/th_msg.c
+++ b/modules/topoh/th_msg.c
@@ -967,6 +967,11 @@ int th_del_via_cookie(sip_msg_t *msg, struct via_body *via)
 {
 	struct via_param *p;
 	struct lump* l;
+
+	if(via==NULL) {
+		LM_DBG("no via header\n");
+		return 0;
+	}
 	for(p=via->param_lst; p; p=p->next)
 	{
 		if(p->name.len==th_cookie_name.len




More information about the sr-dev mailing list