Module: kamailio
Branch: master
Commit: 0a51e8c941b1c916137eb3e57fa7db86ecb9a1f8
URL:
https://github.com/kamailio/kamailio/commit/0a51e8c941b1c916137eb3e57fa7db8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-03-26T11:26:29+01:00
ndb_redis: safety check for log message parameters
---
Modified: modules/ndb_redis/redis_client.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0a51e8c941b1c916137eb3e57fa7db8…
Patch:
https://github.com/kamailio/kamailio/commit/0a51e8c941b1c916137eb3e57fa7db8…
---
diff --git a/modules/ndb_redis/redis_client.c b/modules/ndb_redis/redis_client.c
index 02aa7b8..903284e 100644
--- a/modules/ndb_redis/redis_client.c
+++ b/modules/ndb_redis/redis_client.c
@@ -429,7 +429,8 @@ void * redisc_exec_argv(redisc_server_t *rsrv, int argc, const char
**argv, cons
if(rsrv==NULL || rsrv->ctxRedis==NULL)
{
LM_ERR("no redis context found for server %.*s\n",
- rsrv->sname->len, rsrv->sname->s);
+ (rsrv)?rsrv->sname->len:0,
+ (rsrv)?rsrv->sname->s:"");
return NULL;
}
if(argc<=0)