[sr-dev] git:master: modules_k/group : In case of incorrect param, don't crash

Marius Zbihlei marius.zbihlei at 1and1.ro
Mon Jan 17 13:45:04 CET 2011


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

Author: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Date:   Mon Jan 17 14:32:22 2011 +0200

modules_k/group : In case of incorrect param, don't crash

---

 modules_k/group/group.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules_k/group/group.c b/modules_k/group/group.c
index 3a2368b..faac07d 100644
--- a/modules_k/group/group.c
+++ b/modules_k/group/group.c
@@ -117,6 +117,10 @@ int get_username_domain(struct sip_msg *msg, group_check_p gcp,
 			}
 			turi = &puri;
 			break;
+		default: {
+			LM_ERR("incorrect check id %d\n", gcp->id);
+			return -1;
+		}
 	}
 
 	if (gcp->id != 4) {




More information about the sr-dev mailing list