Module: kamailio Branch: master Commit: dfc407c4009acbd6e05ecfaf4e727b0636ab92a4 URL: https://github.com/kamailio/kamailio/commit/dfc407c4009acbd6e05ecfaf4e727b06...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2022-04-29T09:44:46+02:00
core: main - check the debug cli param value
---
Modified: src/main.c
---
Diff: https://github.com/kamailio/kamailio/commit/dfc407c4009acbd6e05ecfaf4e727b06... Patch: https://github.com/kamailio/kamailio/commit/dfc407c4009acbd6e05ecfaf4e727b06...
---
diff --git a/src/main.c b/src/main.c index 2a268a689b..cb0c92e357 100644 --- a/src/main.c +++ b/src/main.c @@ -2100,6 +2100,10 @@ int main(int argc, char** argv) ksr_slog_init(optarg); break; case KARGOPTVAL+8: + if (optarg == NULL) { + fprintf(stderr, "bad debug level value\n"); + goto error; + } debug_flag = 1; default_core_cfg.debug=(int)strtol(optarg, &tmp, 10); if ((tmp==0) || (*tmp)){