Browse code

usrloc: safety check on len for user in db keepalive routine

(cherry picked from commit a1620fa1b4587239835db6ed5765ce04f927172d)

Daniel-Constantin Mierla authored on 26/10/2020 13:02:48
Showing 1 changed files
... ...
@@ -236,7 +236,7 @@ int ul_ka_db_records(int partidx)
236 236
 				continue;
237 237
 			}
238 238
 			ur.aor.len = strlen(p);
239
-			if(ur.aor.len >= ULKA_AORBUF_SIZE) {
239
+			if(ur.aor.len >= ULKA_AORBUF_SIZE - 1) {
240 240
 				LM_DBG("long username ->skipping\n");
241 241
 				continue;
242 242
 			}