Module: kamailio Branch: master Commit: 9783c270eae580b22e73349ac72afd864b1de592 URL: https://github.com/kamailio/kamailio/commit/9783c270eae580b22e73349ac72afd86...
Author: Henning Westerholt hw@gilawa.com Committer: Henning Westerholt hw@gilawa.com Date: 2024-08-23T10:17:02Z
core: main - safety check for invalid syntax in listen parameter
---
Modified: src/main.c
---
Diff: https://github.com/kamailio/kamailio/commit/9783c270eae580b22e73349ac72afd86... Patch: https://github.com/kamailio/kamailio/commit/9783c270eae580b22e73349ac72afd86...
---
diff --git a/src/main.c b/src/main.c index cbe67350004..993181c7326 100644 --- a/src/main.c +++ b/src/main.c @@ -2765,7 +2765,7 @@ int main(int argc, char **argv) fprintf(stderr, "error during processing -l parameter\n"); } tbuf_tmp = tbuf; - while ((p = strsep(&tbuf, "/")) != NULL) { + while ((p = strsep(&tbuf, "/")) != NULL && listen_field_count < 3) { listen_fields[listen_field_count++] = p; } /* empty advertise only allowed with a name field */