Module: kamailio
Branch: master
Commit: 9783c270eae580b22e73349ac72afd864b1de592
URL: 
https://github.com/kamailio/kamailio/commit/9783c270eae580b22e73349ac72afd864b1de592

Author: Henning Westerholt <[email protected]>
Committer: Henning Westerholt <[email protected]>
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/9783c270eae580b22e73349ac72afd864b1de592.diff
Patch: 
https://github.com/kamailio/kamailio/commit/9783c270eae580b22e73349ac72afd864b1de592.patch

---

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 */

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to [email protected]

Reply via email to