Module: sip-router
Branch: master
Commit: b61f173a8dc40592809912e137e42d8ffe1154fa
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b61f173…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Jan 30 12:14:48 2014 +0100
core: test the limits of nested select level before accessing array value
---
select.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/select.c b/select.c
index 36ae814..772b371 100644
--- a/select.c
+++ b/select.c
@@ -432,7 +432,7 @@ int run_select(str* res, select_t* s, struct sip_msg* msg)
orig_level = select_level;
ret = 0;
for ( select_level=0;
- (ret == 0) && (s->f[select_level] !=0 ) &&
(select_level<MAX_NESTED_CALLS);
+ (ret == 0) && (select_level<MAX_NESTED_CALLS) &&
(s->f[select_level] !=0 );
select_level++
) {
ret = s->f[select_level](res, s, msg);