Module: kamailio
Branch: master
Commit: 55393719873b39c3fe66689539e35cf6c8969abe
URL:
https://github.com/kamailio/kamailio/commit/55393719873b39c3fe66689539e35cf…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2015-01-12T22:21:33+01:00
Merge pull request #28 from seudin/siputil_fix
siputils: fix for e164_check()
Closes #28
---
Modified: modules/siputils/checks.c
---
Diff:
https://github.com/kamailio/kamailio/commit/55393719873b39c3fe66689539e35cf…
Patch:
https://github.com/kamailio/kamailio/commit/55393719873b39c3fe66689539e35cf…
---
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;
}