Module: kamailio
Branch: 5.7
Commit: 5879b5d10d41f8a8a7b458873a4afaf7777fe27d
URL:
https://github.com/kamailio/kamailio/commit/5879b5d10d41f8a8a7b458873a4afaf…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-16T20:06:10+01:00
core: copy the value between quotes for #!defexps
- GH #3631
(cherry picked from commit c26e9877419ac53fb109a24aefb3fcd711fae1d7)
---
Modified: src/core/ppcfg.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5879b5d10d41f8a8a7b458873a4afaf…
Patch:
https://github.com/kamailio/kamailio/commit/5879b5d10d41f8a8a7b458873a4afaf…
---
diff --git a/src/core/ppcfg.c b/src/core/ppcfg.c
index ba7c1263fab..262a7931cd2 100644
--- a/src/core/ppcfg.c
+++ b/src/core/ppcfg.c
@@ -523,7 +523,7 @@ char *pp_defexp_eval(char *exval, int exlen, int qmode)
}
if(qmode == 1) {
res[0] = '"';
- memcpy(res, sval.s + 1, sval.len);
+ memcpy(res + 1, sval.s, sval.len);
res[sval.len + 1] = '"';
res[sval.len + 2] = '\0';
LM_DBG("expression quoted string result: [%s]\n", res);