Module: sip-router
Branch: master
Commit: d17b02ed5014b4e32bd0060f32cabd750956779c
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d17b02e…
Author: Vicente Hernando <vhernando(a)systemonenoc.com>
Committer: Vicente Hernando <vhernando(a)systemonenoc.com>
Date: Wed Apr 10 13:55:57 2013 +0200
modules/pipelimit: check correctly for all arguments in mi_set_pipe
---
modules/pipelimit/pl_ht.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/pipelimit/pl_ht.c b/modules/pipelimit/pl_ht.c
index c144e7e..1146468 100644
--- a/modules/pipelimit/pl_ht.c
+++ b/modules/pipelimit/pl_ht.c
@@ -544,7 +544,7 @@ struct mi_root* mi_set_pipe(struct mi_root* cmd_tree, void* param)
pipeid = node->value;
node = node->next;
- if ( !node->value.s || !node->value.len)
+ if ( !node || !node->value.s || !node->value.len)
goto error;
if (str_map_str(algo_names, &(node->value), (int*)&algo_id)) {
LM_ERR("unknown algorithm: '%.*s'\n", node->value.len,
node->value.s);
@@ -552,7 +552,7 @@ struct mi_root* mi_set_pipe(struct mi_root* cmd_tree, void* param)
}
node = node->next;
- if ( !node->value.s || !node->value.len ||
strno2int(&node->value,&limit)<0)
+ if ( !node || !node->value.s || !node->value.len ||
strno2int(&node->value,&limit)<0)
goto error;
LM_DBG("set_pipe: %.*s:%d:%d\n", pipeid.len, pipeid.s, algo_id, limit);