[sr-dev] git:master:86ecdb2e: enum: single digit is valid in function enum_query
Jonas Böttner
boettner at sipgate.de
Tue May 3 23:02:42 CEST 2016
Module: kamailio
Branch: master
Commit: 86ecdb2ec109af536efa70c2b0e4b93c4072e8b5
URL: https://github.com/kamailio/kamailio/commit/86ecdb2ec109af536efa70c2b0e4b93c4072e8b5
Author: Jonas Böttner <boettner at sipgate.de>
Committer: Jonas Böttner <boettner at sipgate.de>
Date: 2016-05-02T14:19:30+02:00
enum: single digit is valid in function enum_query
- is_e164() returns true for a single digit (previously two digits)
---
Modified: modules/enum/enum.c
---
Diff: https://github.com/kamailio/kamailio/commit/86ecdb2ec109af536efa70c2b0e4b93c4072e8b5.diff
Patch: https://github.com/kamailio/kamailio/commit/86ecdb2ec109af536efa70c2b0e4b93c4072e8b5.patch
---
diff --git a/modules/enum/enum.c b/modules/enum/enum.c
index 6439f54..2c3620f 100644
--- a/modules/enum/enum.c
+++ b/modules/enum/enum.c
@@ -254,7 +254,7 @@ static inline int is_e164(str* _user)
int i;
char c;
- if ((_user->len > 2) && (_user->len < MAX_NUM_LEN) && ((_user->s)[0] == '+')) {
+ if ((_user->len > 1) && (_user->len < MAX_NUM_LEN) && ((_user->s)[0] == '+')) {
for (i = 1; i < _user->len; i++) {
c = (_user->s)[i];
if ((c < '0') || (c > '9')) return -1;
More information about the sr-dev
mailing list