Module: sip-router
Branch: 4.0
Commit: 53655beed57d0165931790683046614e70a8acfd
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=53655be…
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
(cherry picked from commit ed034d4d9096d8c77269828c8efdafb26eac5372)
---
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;