Module: kamailio
Branch: 5.8
Commit: 1928af8f90ebf02f610c0904bc3d24a00aaedb81
URL:
https://github.com/kamailio/kamailio/commit/1928af8f90ebf02f610c0904bc3d24a…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: 2024-03-12T07:54:50+02:00
core: set null-terminated char for modparam (backport from master)
---
Modified: src/core/modparam.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1928af8f90ebf02f610c0904bc3d24a…
Patch:
https://github.com/kamailio/kamailio/commit/1928af8f90ebf02f610c0904bc3d24a…
---
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: