[sr-dev] git:master: ndb_redis: argument checking in redisc_free_reply

Vicente Hernando vhernando at systemonenoc.com
Thu Aug 30 11:26:39 CEST 2012


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

Author: Vicente Hernando <vhernando at systemonenoc.com>
Committer: Vicente Hernando <vhernando at systemonenoc.com>
Date:   Thu Aug 30 05:20:25 2012 -0400

ndb_redis: argument checking in redisc_free_reply

---

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

diff --git a/modules/ndb_redis/redis_client.c b/modules/ndb_redis/redis_client.c
index 5248135..0d8f703 100644
--- a/modules/ndb_redis/redis_client.c
+++ b/modules/ndb_redis/redis_client.c
@@ -482,6 +482,11 @@ int redisc_free_reply(str *name)
 	redisc_reply_t *rpl, *next_rpl;
 	unsigned int hid;
 
+	if(name==NULL || name->len==0) {
+		LM_ERR("invalid parameters");
+		return -1;
+	}
+
 	hid = get_hash1_raw(name->s, name->len);
 
 	rpl = _redisc_rpl_list;




More information about the sr-dev mailing list