[sr-dev] git:master: modules_k/htable $shtex(htable=>key) caused a segfault when reading (null pointer deref)

Marius Zbihlei marius.zbihlei at 1and1.ro
Wed Apr 27 14:55:06 CEST 2011


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

Author: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Date:   Wed Apr 27 15:32:18 2011 +0300

modules_k/htable $shtex(htable=>key) caused a segfault when reading (null pointer deref)
(cherry picked from commit e506dae55f1c5011fe3b7f05e94ba9f02a13dc8b)

---

 modules_k/htable/ht_var.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/modules_k/htable/ht_var.c b/modules_k/htable/ht_var.c
index e97bc1d..03ca66f 100644
--- a/modules_k/htable/ht_var.c
+++ b/modules_k/htable/ht_var.c
@@ -176,7 +176,6 @@ int pv_get_ht_cell_expire(struct sip_msg *msg,  pv_param_t *param,
 		pv_value_t *res)
 {
 	str htname;
-	ht_cell_t *htc=NULL;
 	ht_pv_t *hpv;
 	unsigned int now;
 
@@ -196,7 +195,7 @@ int pv_get_ht_cell_expire(struct sip_msg *msg,  pv_param_t *param,
 	if(ht_get_cell_expire(hpv->ht, &htname, &now)!=0)
 		return pv_get_null(msg, param, res);
 	/* integer */
-	return pv_get_uintval(msg, param, res, htc->value.n);
+	return pv_get_uintval(msg, param, res, now);
 }
 
 int pv_set_ht_cell_expire(struct sip_msg* msg, pv_param_t *param,




More information about the sr-dev mailing list