Module: kamailio
Branch: master
Commit: 160710af0ab85dbf211fa7d445d6d4be9b66db10
URL:
https://github.com/kamailio/kamailio/commit/160710af0ab85dbf211fa7d445d6d4b…
Author: Seudin Kasumovic <seudin.kasumovic(a)gmail.com>
Committer: Seudin Kasumovic <seudin.kasumovic(a)gmail.com>
Date: 2015-01-12T16:24:04+01:00
siputils: fix for e164_check()
- the condition for non-digit matching was always false
---
Modified: modules/siputils/checks.c
---
Diff:
https://github.com/kamailio/kamailio/commit/160710af0ab85dbf211fa7d445d6d4b…
Patch:
https://github.com/kamailio/kamailio/commit/160710af0ab85dbf211fa7d445d6d4b…
---
diff --git a/modules/siputils/checks.c b/modules/siputils/checks.c
index 76ab43d..9a53010 100644
--- a/modules/siputils/checks.c
+++ b/modules/siputils/checks.c
@@ -417,7 +417,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;
}