Module: sip-router
Branch: master
Commit: ed034d4d9096d8c77269828c8efdafb26eac5372
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ed034d4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Dec 6 18:34:49 2013 +0100
ratelimit: signed check for pipe number in rpc_set_queue()
- rpc can reand signed value
---
modules/ratelimit/ratelimit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/ratelimit/ratelimit.c b/modules/ratelimit/ratelimit.c
index 2aab068..8165ff8 100644
--- a/modules/ratelimit/ratelimit.c
+++ b/modules/ratelimit/ratelimit.c
@@ -1189,7 +1189,7 @@ static void rpc_set_queue(rpc_t *rpc, void *c) {
if (rpc->scan(c, "dSd", &queue_no, &method, &pipe_no) < 3)
return;
- if (pipe_no >= MAX_PIPES || pipe_no < 0) {
+ if (pipe_no >= MAX_PIPES || (int)pipe_no < 0) {
LM_ERR("Invalid pipe number: %d\n", pipe_no);
rpc->fault(c, 400, "Invalid pipe number");
return;