[sr-dev] git:master: modules_k/dialog Fixed a crash if a null parameter was given

Marius Zbihlei marius.zbihlei at 1and1.ro
Fri Jan 21 11:47:16 CET 2011


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

Author: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Date:   Fri Jan 21 12:45:21 2011 +0200

modules_k/dialog Fixed a crash if a null parameter was given

---

 modules_k/dialog/dlg_var.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules_k/dialog/dlg_var.c b/modules_k/dialog/dlg_var.c
index 8707ee8..41629cf 100644
--- a/modules_k/dialog/dlg_var.c
+++ b/modules_k/dialog/dlg_var.c
@@ -92,7 +92,7 @@ int pv_set_dlg_ctx(struct sip_msg* msg, pv_param_t *param,
 			_dlg_ctx.to_bye = n;
 		break;
 		case 4:
-			if(val->flags&PV_VAL_STR) {
+			if(val && val->flags&PV_VAL_STR) {
 				if(val->rs.s[val->rs.len]=='\0'
 						&& val->rs.len<DLG_TOROUTE_SIZE) {
 					_dlg_ctx.to_route = route_lookup(&main_rt, val->rs.s);




More information about the sr-dev mailing list