Module: kamailio
Branch: master
Commit: a5dcd9794d6a26469968f8d9d3ee79af8a6e0142
URL:
https://github.com/kamailio/kamailio/commit/a5dcd9794d6a26469968f8d9d3ee79a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-01-10T13:46:06+01:00
app_python: use local var to avoid overlapping values when casting
---
Modified: src/modules/app_python/apy_kemi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a5dcd9794d6a26469968f8d9d3ee79a…
Patch:
https://github.com/kamailio/kamailio/commit/a5dcd9794d6a26469968f8d9d3ee79a…
---
diff --git a/src/modules/app_python/apy_kemi.c b/src/modules/app_python/apy_kemi.c
index 9a1e635c1a6..3d4d6d342d7 100644
--- a/src/modules/app_python/apy_kemi.c
+++ b/src/modules/app_python/apy_kemi.c
@@ -316,7 +316,8 @@ PyObject *sr_apy_kemi_exec_func_ex(sr_kemi_t *ket, PyObject *self,
}
if(ket->ptypes[i]==SR_KEMIP_INT) {
vps[i].vtype = SR_KEMIP_INT;
- vps[i].v.n = (int)vps[i].v.l;
+ ret = (int)vps[i].v.l;
+ vps[i].v.n = ret;
} else {
vps[i].vtype = SR_KEMIP_LONG;
}