Module: kamailio
Branch: master
Commit: 4dc37aee853bbcf9d7fdb96245b76aaa8dfa2930
URL:
https://github.com/kamailio/kamailio/commit/4dc37aee853bbcf9d7fdb96245b76aa…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-03-11T20:56:37+01:00
core: set null-terminated char for modparam
---
Modified: src/core/modparam.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4dc37aee853bbcf9d7fdb96245b76aa…
Patch:
https://github.com/kamailio/kamailio/commit/4dc37aee853bbcf9d7fdb96245b76aa…
---
diff --git a/src/core/modparam.c b/src/core/modparam.c
index 46ea0169e53..b48d9e82442 100644
--- a/src/core/modparam.c
+++ b/src/core/modparam.c
@@ -152,6 +152,7 @@ int set_mod_param_regex(char *regex, char *name, modparam_t type, void
*val)
return -1;
}
strncpy(*((char **)ptr), (char *)val2, len_param);
+ (*((char **)ptr))[len_param] = '\0';
break;
case PARAM_STR: