Module: kamailio
Branch: 4.2
Commit: a56b51de8d6c10e06146fbf65ae7d46793e288c9
URL:
https://github.com/kamailio/kamailio/commit/a56b51de8d6c10e06146fbf65ae7d46…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-15T20:13:44+01:00
siputils: fix for e164_check()
- the condition for non-digit matching was always false
(cherry picked from commit 160710af0ab85dbf211fa7d445d6d4be9b66db10)
---
Modified: modules/siputils/checks.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a56b51de8d6c10e06146fbf65ae7d46…
Patch:
https://github.com/kamailio/kamailio/commit/a56b51de8d6c10e06146fbf65ae7d46…
---
diff --git a/modules/siputils/checks.c b/modules/siputils/checks.c
index 0399747..f265c38 100644
--- a/modules/siputils/checks.c
+++ b/modules/siputils/checks.c
@@ -423,7 +423,7 @@ static inline int e164_check(str* _user)
char c;
if ((_user->len > 2) && (_user->len < 17) &&
((_user->s)[0] == '+')) {
- for (i = 1; i <= _user->len; i++) {
+ for (i = 1; i < _user->len; i++) {
c = (_user->s)[i];
if (c < '0' || c > '9') return -1;
}