Module: kamailio
Branch: 5.4
Commit: b51ea9f361a81fe8117dcef51902e975f7a662d0
URL:
https://github.com/kamailio/kamailio/commit/b51ea9f361a81fe8117dcef51902e97…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-10-26T14:06:15+01:00
usrloc: safety check on len for user in db keepalive routine
(cherry picked from commit a1620fa1b4587239835db6ed5765ce04f927172d)
---
Modified: src/modules/usrloc/dlist.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b51ea9f361a81fe8117dcef51902e97…
Patch:
https://github.com/kamailio/kamailio/commit/b51ea9f361a81fe8117dcef51902e97…
---
diff --git a/src/modules/usrloc/dlist.c b/src/modules/usrloc/dlist.c
index 96a95fe3c9..44ce3c6376 100644
--- a/src/modules/usrloc/dlist.c
+++ b/src/modules/usrloc/dlist.c
@@ -236,7 +236,7 @@ int ul_ka_db_records(int partidx)
continue;
}
ur.aor.len = strlen(p);
- if(ur.aor.len >= ULKA_AORBUF_SIZE) {
+ if(ur.aor.len >= ULKA_AORBUF_SIZE - 1) {
LM_DBG("long username ->skipping\n");
continue;
}