Browse code

ratelimit: signed check for pipe number in rpc_set_queue()

- rpc can reand signed value

(cherry picked from commit ed034d4d9096d8c77269828c8efdafb26eac5372)

Daniel-Constantin Mierla authored on 06/12/2013 17:34:49
Showing 1 changed files
... ...
@@ -1189,7 +1189,7 @@ static void rpc_set_queue(rpc_t *rpc, void *c) {
1189 1189
 
1190 1190
 	if (rpc->scan(c, "dSd", &queue_no, &method, &pipe_no) < 3) return;
1191 1191
 
1192
-	if (pipe_no >= MAX_PIPES || pipe_no < 0) {
1192
+	if (pipe_no >= MAX_PIPES || (int)pipe_no < 0) {
1193 1193
 		LM_ERR("Invalid pipe number: %d\n", pipe_no);
1194 1194
 		rpc->fault(c, 400, "Invalid pipe number");
1195 1195
 		return;